os/graphics/windowing/windowserver/test/t_integ/inc/t_pseudoappeglbase.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/test/t_integ/inc/t_pseudoappeglbase.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,103 @@
     1.4 +// Copyright (c) 2007-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 +// Description:
    1.17 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @test
    1.22 + @internalComponent
    1.23 +*/
    1.24 +
    1.25 +#ifndef __T_PSEUDOAPPEGLBASE_H__
    1.26 +#define __T_PSEUDOAPPEGLBASE_H__
    1.27 +
    1.28 +#include <eikenv.h>
    1.29 +#include <gdi.h>
    1.30 +#include <EGL/egl.h>
    1.31 +#include "t_pseudoappanim.h"
    1.32 +
    1.33 +	/** Attributes for an EColor4K window */
    1.34 +	const EGLint KColor4KAttribList[] =
    1.35 +			{
    1.36 +			EGL_RED_SIZE,		4,
    1.37 +			EGL_GREEN_SIZE,		4,
    1.38 +			EGL_BLUE_SIZE,		4,
    1.39 +			EGL_DEPTH_SIZE,		16,
    1.40 +			EGL_SURFACE_TYPE,	EGL_WINDOW_BIT,
    1.41 +			EGL_NONE
    1.42 +			};
    1.43 +
    1.44 +	/** Attributes for an EColor64K window */
    1.45 +	const EGLint KColor64KAttribList[] =
    1.46 +			{
    1.47 +			EGL_RED_SIZE,		5,
    1.48 +			EGL_GREEN_SIZE,		6,
    1.49 +			EGL_BLUE_SIZE,		5,
    1.50 +			EGL_DEPTH_SIZE,		16,
    1.51 +			EGL_SURFACE_TYPE,	EGL_WINDOW_BIT,
    1.52 +			EGL_NONE
    1.53 +			};
    1.54 +
    1.55 +	/** Attributes for an EColor16M window */
    1.56 +	const EGLint KColor16MAttribList[] =
    1.57 +			{
    1.58 +			EGL_RED_SIZE,		8,
    1.59 +			EGL_GREEN_SIZE,		8,
    1.60 +			EGL_BLUE_SIZE,		8,
    1.61 +			EGL_DEPTH_SIZE,		16,
    1.62 +			EGL_SURFACE_TYPE,	EGL_WINDOW_BIT,
    1.63 +			EGL_NONE
    1.64 +			};
    1.65 +
    1.66 +	const EGLint KColor16MAAttribList[] =
    1.67 +			{
    1.68 +		EGL_BUFFER_SIZE,    32,
    1.69 +		EGL_RED_SIZE,		8,
    1.70 +		EGL_GREEN_SIZE, 	8,
    1.71 +		EGL_BLUE_SIZE,		8,
    1.72 +		EGL_ALPHA_SIZE, 	8,
    1.73 +		EGL_RENDERABLE_TYPE,EGL_OPENVG_BIT | EGL_OPENGL_ES_BIT,
    1.74 +		EGL_SURFACE_TYPE,	EGL_WINDOW_BIT,
    1.75 +		EGL_NONE
    1.76 +			};	
    1.77 +
    1.78 +class CEglBase : public CTestAnimation
    1.79 +	{
    1.80 +public:
    1.81 +	virtual ~CEglBase();
    1.82 +	
    1.83 +protected:
    1.84 +	CEglBase(const TDisplayMode& aMode,const TSize& aSurfaceSz,const TInt aHRate,const TInt aVRate);
    1.85 +	void BaseConstructL(RWindow* aWin);
    1.86 +
    1.87 +	virtual void DrawToEglL()=0;
    1.88 +	void TestL(const TInt aRet, const TDesC& aMessage);
    1.89 +	
    1.90 +private:
    1.91 +	TInt GetSuitableConfig(const EGLConfig* aConfigs, EGLint aNumConfigs, const EGLint* attribs);
    1.92 +	
    1.93 +
    1.94 +protected: // Data
    1.95 +	EGLDisplay 			iDisplay;
    1.96 +	EGLSurface 			iSurface;
    1.97 +	EGLContext 			iContext;
    1.98 +	EGLConfig 			iUseConfig;
    1.99 +	float				iX;
   1.100 +	float				iY;
   1.101 +
   1.102 +private: //Data
   1.103 +	TDisplayMode		iDispMode;
   1.104 +	};
   1.105 +
   1.106 +#endif //__T_PSEUDOAPPEGLBASE_H__