os/graphics/egl/egltest/inc/egltest_oom_sgimage.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
/**
sl@0
    17
 @file
sl@0
    18
 @test
sl@0
    19
*/
sl@0
    20
#ifndef __EGLTEST_OOM_SGIMAGE_H__
sl@0
    21
#define __EGLTEST_OOM_SGIMAGE_H__
sl@0
    22
sl@0
    23
#include "eglteststep.h"
sl@0
    24
sl@0
    25
sl@0
    26
NONSHARABLE_CLASS(CEglTest_OOM_Base) : public CEglTestStep
sl@0
    27
    {
sl@0
    28
public:
sl@0
    29
    ~CEglTest_OOM_Base();
sl@0
    30
sl@0
    31
protected:
sl@0
    32
    void CleanGraphicsResources();
sl@0
    33
    void CheckDeviation();
sl@0
    34
    void RetrieveExtensionDataL();
sl@0
    35
    void SendIndexToMainProcessL(TInt aIndex);
sl@0
    36
    // from CTestStep
sl@0
    37
    TVerdict doTestStepPreambleL();
sl@0
    38
    TVerdict doTestStepPostambleL();
sl@0
    39
    //from CEglTestStep
sl@0
    40
    virtual void ReceiveMessageFromClient(RMsgQueue<TEglStepMessageBuffer>& aMessageQueueClientProcParam);
sl@0
    41
    
sl@0
    42
private:
sl@0
    43
    TInt Deviation(const RArray<TInt>& aArray) const;
sl@0
    44
    void GetMinMax(const RArray<TInt>& aArray, TInt& aMin, TInt& aMax) const;
sl@0
    45
    void PrintEglResourceProfilingInfoL(); // if NOK_resource_profiling2 extension is 
sl@0
    46
                                          //available it outputs to the log file GPU memory usage
sl@0
    47
sl@0
    48
protected:
sl@0
    49
    TInt iNumIterations;
sl@0
    50
    TSize iImageSize;
sl@0
    51
    TUidPixelFormat iPixelFormat;
sl@0
    52
    RArray<EGLSurface> iSurfaces;
sl@0
    53
    RArray<EGLImageKHR> iEglImages;
sl@0
    54
    RArray<VGImage> iVgImages;
sl@0
    55
    RArray<RSgImage> iSgImages;
sl@0
    56
    
sl@0
    57
    TInt iLastIterationNumber;
sl@0
    58
private:
sl@0
    59
    RArray<TInt> iGPUUsedMemory;
sl@0
    60
    RArray<TInt> iLastIterations;
sl@0
    61
    
sl@0
    62
    //Deviation in percentage between max and min of GPU memory 
sl@0
    63
    //retrieved at the end of each attempt through NOK_resource_profiling2 egl extension inteface
sl@0
    64
    TInt iThresholdGPUUsedMemory;
sl@0
    65
sl@0
    66
    //Deviation in percentage between max and min of successful iteration number 
sl@0
    67
    //retrieved at the end of each attempt 
sl@0
    68
    TInt iThresholdLastIteration;
sl@0
    69
    
sl@0
    70
#ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
sl@0
    71
#ifdef EGL_PROF_MEMORY_USAGE_THRESHOLD_NOK    
sl@0
    72
    PFNEGLQUERYPROFILINGDATANOKPROC iPFnEglQueryProfilingDataNOK;
sl@0
    73
#endif    
sl@0
    74
#endif    
sl@0
    75
    };
sl@0
    76
sl@0
    77
_LIT(KOOM_CloseVGImageWithTermination, "OOM_CloseVGImageWithTermination");
sl@0
    78
NONSHARABLE_CLASS(CEglTest_OOM_CloseVGImageWithTermination) : public CEglTest_OOM_Base
sl@0
    79
    {
sl@0
    80
public:
sl@0
    81
    // from CTestStep
sl@0
    82
    TVerdict doTestStepL();
sl@0
    83
    
sl@0
    84
protected:
sl@0
    85
    // from CEglTestStep
sl@0
    86
    void doProcessFunctionL(TInt aIdx);
sl@0
    87
   };
sl@0
    88
sl@0
    89
_LIT(KOOM_CloseVGImage, "OOM_CloseVGImage");
sl@0
    90
NONSHARABLE_CLASS(CEglTest_OOM_CloseVGImage) : public CEglTest_OOM_Base
sl@0
    91
    {
sl@0
    92
public:
sl@0
    93
    // from CTestStep
sl@0
    94
    TVerdict doTestStepL();
sl@0
    95
    
sl@0
    96
protected:
sl@0
    97
    // from CEglTestStep
sl@0
    98
    void doProcessFunctionL(TInt aIdx);
sl@0
    99
   };
sl@0
   100
sl@0
   101
_LIT(KOOM_ClosePixmapSurfaceWithTermination, "OOM_ClosePixmapSurfaceWithTermination");
sl@0
   102
NONSHARABLE_CLASS(CEglTest_OOM_ClosePixmapSurfaceWithTermination) : public CEglTest_OOM_Base
sl@0
   103
    {
sl@0
   104
public:
sl@0
   105
    // from CTestStep
sl@0
   106
    TVerdict doTestStepL();
sl@0
   107
    
sl@0
   108
protected:
sl@0
   109
    // from CEglTestStep
sl@0
   110
    void doProcessFunctionL(TInt aIdx);
sl@0
   111
   };
sl@0
   112
sl@0
   113
_LIT(KOOM_ClosePixmapSurface, "OOM_ClosePixmapSurface");
sl@0
   114
NONSHARABLE_CLASS(CEglTest_OOM_ClosePixmapSurface) : public CEglTest_OOM_Base
sl@0
   115
    {
sl@0
   116
public:
sl@0
   117
    // from CTestStep
sl@0
   118
    TVerdict doTestStepL();
sl@0
   119
    
sl@0
   120
protected:
sl@0
   121
    // from CEglTestStep
sl@0
   122
    void doProcessFunctionL(TInt aIdx);
sl@0
   123
   };
sl@0
   124
sl@0
   125
_LIT(KOOM_CloseSgImageDifferentProcess, "OOM_CloseSgImageDifferentProcess");
sl@0
   126
NONSHARABLE_CLASS(CEglTest_OOM_CloseSgImageDifferentProcess) : public CEglTest_OOM_Base
sl@0
   127
    {
sl@0
   128
public:
sl@0
   129
    // from CTestStep
sl@0
   130
    TVerdict doTestStepL();
sl@0
   131
    
sl@0
   132
protected:
sl@0
   133
    // from CEglTestStep
sl@0
   134
    void doProcessFunctionL(TInt aIdx);
sl@0
   135
   };
sl@0
   136
sl@0
   137
_LIT(KOOM_CloseSgImageSameThread, "OOM_CloseSgImageSameThread");
sl@0
   138
NONSHARABLE_CLASS(CEglTest_OOM_CloseSgImageSameThread) : public CEglTest_OOM_Base
sl@0
   139
    {
sl@0
   140
public:
sl@0
   141
    // from CTestStep
sl@0
   142
    TVerdict doTestStepL();
sl@0
   143
    };
sl@0
   144
sl@0
   145
#endif // __EGLTEST_OOM_SGIMAGE_H__