sl@0: // Copyright (c) 2009-2010 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: */ sl@0: #ifndef __EGLTEST_OOM_SGIMAGE_H__ sl@0: #define __EGLTEST_OOM_SGIMAGE_H__ sl@0: sl@0: #include "eglteststep.h" sl@0: sl@0: sl@0: NONSHARABLE_CLASS(CEglTest_OOM_Base) : public CEglTestStep sl@0: { sl@0: public: sl@0: ~CEglTest_OOM_Base(); sl@0: sl@0: protected: sl@0: void CleanGraphicsResources(); sl@0: void CheckDeviation(); sl@0: void RetrieveExtensionDataL(); sl@0: void SendIndexToMainProcessL(TInt aIndex); sl@0: // from CTestStep sl@0: TVerdict doTestStepPreambleL(); sl@0: TVerdict doTestStepPostambleL(); sl@0: //from CEglTestStep sl@0: virtual void ReceiveMessageFromClient(RMsgQueue& aMessageQueueClientProcParam); sl@0: sl@0: private: sl@0: TInt Deviation(const RArray& aArray) const; sl@0: void GetMinMax(const RArray& aArray, TInt& aMin, TInt& aMax) const; sl@0: void PrintEglResourceProfilingInfoL(); // if NOK_resource_profiling2 extension is sl@0: //available it outputs to the log file GPU memory usage sl@0: sl@0: protected: sl@0: TInt iNumIterations; sl@0: TSize iImageSize; sl@0: TUidPixelFormat iPixelFormat; sl@0: RArray iSurfaces; sl@0: RArray iEglImages; sl@0: RArray iVgImages; sl@0: RArray iSgImages; sl@0: sl@0: TInt iLastIterationNumber; sl@0: private: sl@0: RArray iGPUUsedMemory; sl@0: RArray iLastIterations; sl@0: sl@0: //Deviation in percentage between max and min of GPU memory sl@0: //retrieved at the end of each attempt through NOK_resource_profiling2 egl extension inteface sl@0: TInt iThresholdGPUUsedMemory; sl@0: sl@0: //Deviation in percentage between max and min of successful iteration number sl@0: //retrieved at the end of each attempt sl@0: TInt iThresholdLastIteration; sl@0: sl@0: #ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE sl@0: #ifdef EGL_PROF_MEMORY_USAGE_THRESHOLD_NOK sl@0: PFNEGLQUERYPROFILINGDATANOKPROC iPFnEglQueryProfilingDataNOK; sl@0: #endif sl@0: #endif sl@0: }; sl@0: sl@0: _LIT(KOOM_CloseVGImageWithTermination, "OOM_CloseVGImageWithTermination"); sl@0: NONSHARABLE_CLASS(CEglTest_OOM_CloseVGImageWithTermination) : public CEglTest_OOM_Base sl@0: { sl@0: public: sl@0: // from CTestStep sl@0: TVerdict doTestStepL(); sl@0: sl@0: protected: sl@0: // from CEglTestStep sl@0: void doProcessFunctionL(TInt aIdx); sl@0: }; sl@0: sl@0: _LIT(KOOM_CloseVGImage, "OOM_CloseVGImage"); sl@0: NONSHARABLE_CLASS(CEglTest_OOM_CloseVGImage) : public CEglTest_OOM_Base sl@0: { sl@0: public: sl@0: // from CTestStep sl@0: TVerdict doTestStepL(); sl@0: sl@0: protected: sl@0: // from CEglTestStep sl@0: void doProcessFunctionL(TInt aIdx); sl@0: }; sl@0: sl@0: _LIT(KOOM_ClosePixmapSurfaceWithTermination, "OOM_ClosePixmapSurfaceWithTermination"); sl@0: NONSHARABLE_CLASS(CEglTest_OOM_ClosePixmapSurfaceWithTermination) : public CEglTest_OOM_Base sl@0: { sl@0: public: sl@0: // from CTestStep sl@0: TVerdict doTestStepL(); sl@0: sl@0: protected: sl@0: // from CEglTestStep sl@0: void doProcessFunctionL(TInt aIdx); sl@0: }; sl@0: sl@0: _LIT(KOOM_ClosePixmapSurface, "OOM_ClosePixmapSurface"); sl@0: NONSHARABLE_CLASS(CEglTest_OOM_ClosePixmapSurface) : public CEglTest_OOM_Base sl@0: { sl@0: public: sl@0: // from CTestStep sl@0: TVerdict doTestStepL(); sl@0: sl@0: protected: sl@0: // from CEglTestStep sl@0: void doProcessFunctionL(TInt aIdx); sl@0: }; sl@0: sl@0: _LIT(KOOM_CloseSgImageDifferentProcess, "OOM_CloseSgImageDifferentProcess"); sl@0: NONSHARABLE_CLASS(CEglTest_OOM_CloseSgImageDifferentProcess) : public CEglTest_OOM_Base sl@0: { sl@0: public: sl@0: // from CTestStep sl@0: TVerdict doTestStepL(); sl@0: sl@0: protected: sl@0: // from CEglTestStep sl@0: void doProcessFunctionL(TInt aIdx); sl@0: }; sl@0: sl@0: _LIT(KOOM_CloseSgImageSameThread, "OOM_CloseSgImageSameThread"); sl@0: NONSHARABLE_CLASS(CEglTest_OOM_CloseSgImageSameThread) : public CEglTest_OOM_Base sl@0: { sl@0: public: sl@0: // from CTestStep sl@0: TVerdict doTestStepL(); sl@0: }; sl@0: sl@0: #endif // __EGLTEST_OOM_SGIMAGE_H__