Update contrib.
1 // Copyright (c) 2009-2010 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
20 #ifndef __EGLTEST_OOM_SGIMAGE_H__
21 #define __EGLTEST_OOM_SGIMAGE_H__
23 #include "eglteststep.h"
26 NONSHARABLE_CLASS(CEglTest_OOM_Base) : public CEglTestStep
32 void CleanGraphicsResources();
33 void CheckDeviation();
34 void RetrieveExtensionDataL();
35 void SendIndexToMainProcessL(TInt aIndex);
37 TVerdict doTestStepPreambleL();
38 TVerdict doTestStepPostambleL();
40 virtual void ReceiveMessageFromClient(RMsgQueue<TEglStepMessageBuffer>& aMessageQueueClientProcParam);
43 TInt Deviation(const RArray<TInt>& aArray) const;
44 void GetMinMax(const RArray<TInt>& aArray, TInt& aMin, TInt& aMax) const;
45 void PrintEglResourceProfilingInfoL(); // if NOK_resource_profiling2 extension is
46 //available it outputs to the log file GPU memory usage
51 TUidPixelFormat iPixelFormat;
52 RArray<EGLSurface> iSurfaces;
53 RArray<EGLImageKHR> iEglImages;
54 RArray<VGImage> iVgImages;
55 RArray<RSgImage> iSgImages;
57 TInt iLastIterationNumber;
59 RArray<TInt> iGPUUsedMemory;
60 RArray<TInt> iLastIterations;
62 //Deviation in percentage between max and min of GPU memory
63 //retrieved at the end of each attempt through NOK_resource_profiling2 egl extension inteface
64 TInt iThresholdGPUUsedMemory;
66 //Deviation in percentage between max and min of successful iteration number
67 //retrieved at the end of each attempt
68 TInt iThresholdLastIteration;
70 #ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
71 #ifdef EGL_PROF_MEMORY_USAGE_THRESHOLD_NOK
72 PFNEGLQUERYPROFILINGDATANOKPROC iPFnEglQueryProfilingDataNOK;
77 _LIT(KOOM_CloseVGImageWithTermination, "OOM_CloseVGImageWithTermination");
78 NONSHARABLE_CLASS(CEglTest_OOM_CloseVGImageWithTermination) : public CEglTest_OOM_Base
82 TVerdict doTestStepL();
86 void doProcessFunctionL(TInt aIdx);
89 _LIT(KOOM_CloseVGImage, "OOM_CloseVGImage");
90 NONSHARABLE_CLASS(CEglTest_OOM_CloseVGImage) : public CEglTest_OOM_Base
94 TVerdict doTestStepL();
98 void doProcessFunctionL(TInt aIdx);
101 _LIT(KOOM_ClosePixmapSurfaceWithTermination, "OOM_ClosePixmapSurfaceWithTermination");
102 NONSHARABLE_CLASS(CEglTest_OOM_ClosePixmapSurfaceWithTermination) : public CEglTest_OOM_Base
106 TVerdict doTestStepL();
110 void doProcessFunctionL(TInt aIdx);
113 _LIT(KOOM_ClosePixmapSurface, "OOM_ClosePixmapSurface");
114 NONSHARABLE_CLASS(CEglTest_OOM_ClosePixmapSurface) : public CEglTest_OOM_Base
118 TVerdict doTestStepL();
122 void doProcessFunctionL(TInt aIdx);
125 _LIT(KOOM_CloseSgImageDifferentProcess, "OOM_CloseSgImageDifferentProcess");
126 NONSHARABLE_CLASS(CEglTest_OOM_CloseSgImageDifferentProcess) : public CEglTest_OOM_Base
130 TVerdict doTestStepL();
134 void doProcessFunctionL(TInt aIdx);
137 _LIT(KOOM_CloseSgImageSameThread, "OOM_CloseSgImageSameThread");
138 NONSHARABLE_CLASS(CEglTest_OOM_CloseSgImageSameThread) : public CEglTest_OOM_Base
142 TVerdict doTestStepL();
145 #endif // __EGLTEST_OOM_SGIMAGE_H__