os/graphics/egl/egltest/endpointtestsuite/automated/src/renderstagefactory.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/egl/egltest/endpointtestsuite/automated/src/renderstagefactory.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,80 @@
     1.4 +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +
    1.16 +
    1.17 +/**
    1.18 + @file
    1.19 + @test
    1.20 + @internalComponent - Internal Symbian test code
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +#include "renderstagefactory.h"
    1.25 +#include "renderstage.h"
    1.26 +
    1.27 +
    1.28 +_LIT(KRenderStageName, "eglendpointremotetest");
    1.29 +
    1.30 +
    1.31 +CRenderStageFactory* CRenderStageFactory::CreateL()
    1.32 +	{
    1.33 +	return new(ELeave) CRenderStageFactory;
    1.34 +	}
    1.35 +
    1.36 +
    1.37 +//aData contains data specific to the plugin that was included in wsini.ini.
    1.38 +//EglEndpointTestRenderStage has no such defined data. Therefore ignore it.
    1.39 +void CRenderStageFactory::ConstructL(MWsGraphicDrawerEnvironment& aEnv, const TDesC8& /*aData*/)
    1.40 +	{
    1.41 +	BaseConstructL(aEnv);
    1.42 +	}
    1.43 +
    1.44 +
    1.45 +CRenderStageFactory::CRenderStageFactory()
    1.46 +	{
    1.47 +	}
    1.48 +
    1.49 +
    1.50 +CRenderStageFactory::~CRenderStageFactory()
    1.51 +	{
    1.52 +	}
    1.53 +
    1.54 +
    1.55 +TAny* CRenderStageFactory::ResolveObjectInterface(TUint aTypeId)
    1.56 +	{
    1.57 +	switch (aTypeId)
    1.58 +		{
    1.59 +		case KMWsRenderStageFactory:
    1.60 +			return static_cast<MWsRenderStageFactory*>(this);
    1.61 +		default:
    1.62 +			return NULL;
    1.63 +		}
    1.64 +	}
    1.65 +
    1.66 +
    1.67 +//EglEndpointTestRenderStage cannot be used as the last render stage in the chain. Therefore return NULL here.
    1.68 +CWsRenderStage* CRenderStageFactory::CreateFinalRenderStageL(MWsScreen* /*aScreen*/, MWsScreenRedraw* /*aScreenRedraw*/, TInt /*aScreenNumber*/)
    1.69 +	{
    1.70 +	return NULL;
    1.71 +	}
    1.72 +
    1.73 +
    1.74 +CWsRenderStage* CRenderStageFactory::CreateRenderStageL(MWsScreen* aScreen, MWsScreenRedraw* aScreenRedraw, CWsRenderStage* aNextStage)
    1.75 +	{
    1.76 +	return CRenderStage::NewL(&Env(), aScreen, aScreenRedraw, aNextStage);
    1.77 +	}
    1.78 +
    1.79 +
    1.80 +const TDesC& CRenderStageFactory::PluginName() const
    1.81 +	{
    1.82 +	return KRenderStageName;
    1.83 +	}