os/graphics/egl/egltest/endpointtestsuite/automated/src/renderstagefactory.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 
    13 
    14 /**
    15  @file
    16  @test
    17  @internalComponent - Internal Symbian test code
    18 */
    19 
    20 
    21 #include "renderstagefactory.h"
    22 #include "renderstage.h"
    23 
    24 
    25 _LIT(KRenderStageName, "eglendpointremotetest");
    26 
    27 
    28 CRenderStageFactory* CRenderStageFactory::CreateL()
    29 	{
    30 	return new(ELeave) CRenderStageFactory;
    31 	}
    32 
    33 
    34 //aData contains data specific to the plugin that was included in wsini.ini.
    35 //EglEndpointTestRenderStage has no such defined data. Therefore ignore it.
    36 void CRenderStageFactory::ConstructL(MWsGraphicDrawerEnvironment& aEnv, const TDesC8& /*aData*/)
    37 	{
    38 	BaseConstructL(aEnv);
    39 	}
    40 
    41 
    42 CRenderStageFactory::CRenderStageFactory()
    43 	{
    44 	}
    45 
    46 
    47 CRenderStageFactory::~CRenderStageFactory()
    48 	{
    49 	}
    50 
    51 
    52 TAny* CRenderStageFactory::ResolveObjectInterface(TUint aTypeId)
    53 	{
    54 	switch (aTypeId)
    55 		{
    56 		case KMWsRenderStageFactory:
    57 			return static_cast<MWsRenderStageFactory*>(this);
    58 		default:
    59 			return NULL;
    60 		}
    61 	}
    62 
    63 
    64 //EglEndpointTestRenderStage cannot be used as the last render stage in the chain. Therefore return NULL here.
    65 CWsRenderStage* CRenderStageFactory::CreateFinalRenderStageL(MWsScreen* /*aScreen*/, MWsScreenRedraw* /*aScreenRedraw*/, TInt /*aScreenNumber*/)
    66 	{
    67 	return NULL;
    68 	}
    69 
    70 
    71 CWsRenderStage* CRenderStageFactory::CreateRenderStageL(MWsScreen* aScreen, MWsScreenRedraw* aScreenRedraw, CWsRenderStage* aNextStage)
    72 	{
    73 	return CRenderStage::NewL(&Env(), aScreen, aScreenRedraw, aNextStage);
    74 	}
    75 
    76 
    77 const TDesC& CRenderStageFactory::PluginName() const
    78 	{
    79 	return KRenderStageName;
    80 	}