sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: @internalComponent sl@0: */ sl@0: sl@0: #ifndef __T_PSEUDOAPPSURFACEDWINDOW_H__ sl@0: #define __T_PSEUDOAPPSURFACEDWINDOW_H__ sl@0: sl@0: #include sl@0: #include //Display modes sl@0: #include sl@0: sl@0: #include //TSurfaceId sl@0: #include //RSurfaceManager sl@0: sl@0: #include "t_pseudoappwindow.h" sl@0: #include "t_pseudoappanim.h" sl@0: #include "t_pseudoapptestresults.h" sl@0: #include "t_pseudoappshared.h" sl@0: sl@0: class CTestSurfacedWindow : public CBase sl@0: { sl@0: enum TWindowType sl@0: { sl@0: EUiWindow, sl@0: EEcomWindow, sl@0: EEmptyWindow sl@0: }; sl@0: sl@0: enum TApplicationType sl@0: { sl@0: ENoApp, sl@0: EFbsBitmap, sl@0: EOpenVG, sl@0: EOpenGLes, sl@0: EPerformance sl@0: }; sl@0: sl@0: public: sl@0: static CTestSurfacedWindow* NewL(TInt aScreenNo, TInt aWindowNumber, TDisplayMode aMode, TInt aFrameDuration, const TSize& aScreenSize, TGceTestResults* aGceTestResults, sl@0: const TDesC& aConfigFileName, CTPseudoAppShared& aPseudoAppShared); sl@0: void UpdateL(SurfaceDetails& aSurfDetails); sl@0: void RotateL(TInt aScreenNo, TInt aWindowNumber, const TSize& aScreenSize, TInt aFrameNumber); sl@0: TBool RotationSupported(); sl@0: ~CTestSurfacedWindow(); sl@0: sl@0: private: sl@0: CTestSurfacedWindow(TInt aScreenNo, TInt aWindowNumber, CTPseudoAppShared& aPseudoAppShared); sl@0: void ConstructL(TInt aScreenNo, TInt aWindowNumber, TDisplayMode aMode, TInt aFrameDuration, const TSize& aScreenSize, TGceTestResults* aGceTestResults, sl@0: const TDesC& aConfigFileName); sl@0: void CreateSurfaceManager(); sl@0: void DestroySurfaceManager(); sl@0: void DestroySurface(); sl@0: CTestAnimation* CreateAnimationL(TInt aAppType, const TSize& aAnimSize, const TSize& aSurfaceSize, sl@0: TPtrC& aBitmapFile, TDisplayMode aDisplayMode, sl@0: TInt aHorizontalRate, TInt aVerticalRate, TPixelFormat aPixelFormat); sl@0: void ImportWindowConfigL(TInt aScreenNo, TInt aWindowNo, TDisplayMode aMode, TInt aFrameDuration, const TSize& aScreenSize, TGceTestResults* aGceTestResults); sl@0: void ImportSurfaceConfigL(TInt aScreenNo, TInt aWindowNo, const TSize& aScreenSize, TSize& aSurfaceSize, TInt& aSurfacePresent, TPixelFormat& aPixelFormat); sl@0: void ImportAnimConfigL(TInt aScreenNo, TInt aWindowNo, TDisplayMode aMode, const TSize& aSurfaceSize, TPixelFormat aPixelFormat); sl@0: CArrayFixFlat* ImportWindowSizeChangeParamsL(const TDesC& tempStore); sl@0: CArrayFixFlat* ImportWindowPositionChangeParamsL(const TDesC& tempStore); sl@0: CArrayFixFlat* ImportWindowBitmapParamsL(const TDesC& tempStore, TInt aMultiBitmapUiFileSize, const TSize& aScreenSize); sl@0: void BuildDimensionArrayL(const TSize& aScreenSize, TInt aFrameDuration, TInt aWindowChangeGeometry, TInt aWindowChangeBehavior); sl@0: void ParamChangeCyclicPosition(TDrawParameters& aDrawParams, TInt aFrameCounter, TInt aFrameDuration, const TSize& aScreenSize); sl@0: void ParamChangeCyclicPositionAndSize(TDrawParameters& aDrawParams, TInt aFrameCounter, TInt aFrameDuration, const TSize& aScreenSize); sl@0: void ParamChangeOpacity(TInt aFrameCounter, TInt aFrameDuration, TDrawParameters& aDrawParams); sl@0: void CalcNewWindowLocation(const TSize& aScreensize, TInt aIncrement, TInt aDirection,TDrawParameters& aDrawParams); sl@0: sl@0: private: sl@0: CTestWindow* iTestWindow; sl@0: CTestAnimation* iTestAnimation; sl@0: CArrayFixFlat* iSizeArray; sl@0: CArrayFixFlat* iPositionArray; sl@0: CArrayFixFlat* iLoadsarects; sl@0: CArrayFixFlat* iLoadsaParameters; sl@0: TGceTestResults* iGceTestResults; sl@0: sl@0: TSurfaceId iSurfaceId; sl@0: RSurfaceManager iSurfaceManager; sl@0: RSurfaceUpdateSession iSurfaceUpdateSession; sl@0: TInt iSurfaceScreenNumber; sl@0: TInt iSurfaceBufferNumber; sl@0: CTestSurfaceRasterizer* iSurfaceRasterizer; sl@0: CIniData* iUtils; sl@0: TInt iScreenNo; sl@0: TInt iWindowNumber; sl@0: CTPseudoAppShared& iPseudoAppShared; sl@0: }; sl@0: sl@0: #endif //__T_PSEUDOAPPSURFACEDWINDOW_H__