os/graphics/egl/egltest/inc/egltest_stress_sgimage.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/egl/egltest/inc/egltest_stress_sgimage.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,122 @@
     1.4 +// Copyright (c) 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 +*/
    1.23 +
    1.24 +#ifndef __EGLTEST_STRESS_SGIMAGE_H__
    1.25 +#define __EGLTEST_STRESS_SGIMAGE_H__
    1.26 +
    1.27 +#include <VG/openvg.h>
    1.28 +#include <test/egltestcommonstep.h>
    1.29 +#include "egltest_stress_common_sgimage.h"
    1.30 +
    1.31 +//Test step names
    1.32 +_LIT(KStressPixmapSurface, "StressPixmapSurface");
    1.33 +_LIT(KStressVGImage, "StressVGImage");
    1.34 +_LIT(KStressReadOnly, "StressReadOnly");
    1.35 +_LIT(KEStressReadWriteSingleImage, "StressReadWriteSingleImage");
    1.36 +_LIT(KStressReadWriteMultiImage, "StressReadWriteMultiImage");
    1.37 +
    1.38 +//ini file parameters
    1.39 +_LIT(KPixelFormat, "PixelFormat");
    1.40 +_LIT(KNumberRSgImages, "NumberRSgImages");
    1.41 +_LIT(KNumberChildProcesses, "NumberChildProcesses");
    1.42 +_LIT(KNumberMainImages, "NumberMainImages");
    1.43 +_LIT(KRSgImageWidth, "RSgImageWidth");
    1.44 +_LIT(KRSgImageHeight, "RSgImageHeight");
    1.45 +
    1.46 +//default section for sim load app ini file
    1.47 +_LIT(KDefaultSectionName,"default");
    1.48 +
    1.49 +//supported pixel formats for these test cases
    1.50 +_LIT(KUidPixelFormatARGB_8888, "PixelFormatARGB_8888");
    1.51 +_LIT(KUidPixelFormatARGB_8888_PRE, "PixelFormatARGB_8888_PRE");
    1.52 +_LIT(KUidPixelFormatRGB_565, "PixelFormatRGB_565");
    1.53 +
    1.54 +//Child application
    1.55 +_LIT(KStressTestClientApp, "z:\\sys\\bin\\eglteststressprocesssgimage.exe");
    1.56 +
    1.57 +//Panic string
    1.58 +_LIT(KStressTestMainAppPanic, "Stress Test Main App");
    1.59 +
    1.60 +_LIT(KStress, "Stress");
    1.61 +NONSHARABLE_CLASS(CEglTest_Stress) : public CEglTestStep
    1.62 +    {
    1.63 +public:
    1.64 +    ~CEglTest_Stress();
    1.65 +    TVerdict doTestStepL();
    1.66 +
    1.67 +private:
    1.68 +    void PaintSurfaceL(EGLDisplay aDisplay, EGLSurface aSurface, EGLContext aContext);
    1.69 +    void CreateChildProcessL(TInt aProcessNumber,  TTestType aTestType, TSgDrawableId aDrawableId);
    1.70 +    void CreateChildProcessesL();
    1.71 +    void ClearDownArraysL(EGLDisplay aDisplay);
    1.72 +    void CreateSimLoadAppL();
    1.73 +    void CreateSimLoadProcessL(const TDesC& aApp);
    1.74 +    void DestroySimLoadProcess();
    1.75 +    void ReadIniValueL(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
    1.76 +    void ReadIniValuesL();
    1.77 +    void PrintConfigDataL();
    1.78 +    void DeleteConfigData();
    1.79 +
    1.80 +private:
    1.81 +    TPtrC iPixelFormat;
    1.82 +    TInt iNumberRSgImages;
    1.83 +    TInt iNumberChildProcesses;
    1.84 +    TInt iNumberMainImages;
    1.85 +    TInt iRSgImageWidth;
    1.86 +    TInt iRSgImageHeight;
    1.87 +    TInt iSimLoadValue;
    1.88 +    TInt iByteSize;
    1.89 +    TUidPixelFormat iFormat;
    1.90 +    VGImageFormat iVgFormat;
    1.91 +    TBool iAlphaPre;
    1.92 +    TTestType iTestType;
    1.93 +    RArray<RSgImage> iSgImageArray;
    1.94 +    RArray<VGImage> iVGImageArray;
    1.95 +    RArray<EGLSurface> iSurfaceArray;
    1.96 +    RArray<RProcess> iProcessArray;
    1.97 +    RArray<RProcess> iProcessList;
    1.98 +    RFs iFs;
    1.99 +};
   1.100 +
   1.101 +class CTReadWriteMain : public CTReadWrite
   1.102 +    {
   1.103 +public:
   1.104 +    static CTReadWriteMain* NewL(EGLDisplay aDisplay, EGLSurface aSurface, EGLContext aContext, TInt aWidth, TInt aHeight, TInt aByteSize, VGImageFormat aFormat, TBool& aTestPass, TInt& aFinishedCounter, const TTestType& aTestType, VGImage aVGImage = 0);
   1.105 +
   1.106 +private:
   1.107 +    CTReadWriteMain(EGLDisplay aDisplay, EGLSurface aSurface, EGLContext aContext, TInt aWidth, TInt aHeight, TInt aByteSize, VGImageFormat aFormat, TBool& aTestPass, TInt& aFinishedCounter, const TTestType& aTestType);
   1.108 +    void ConstructL(VGImage aVGImage);
   1.109 +    void ReadImageFuncL();
   1.110 +    void ReadFuncL();
   1.111 +    void WriteImageFuncL();
   1.112 +    void VgImageFuncL();
   1.113 +    void MakeCurrentL() const;
   1.114 +    TBool IsFinished();
   1.115 +    void PixmapSurfaceFuncL();
   1.116 +
   1.117 +private:
   1.118 +    EGLDisplay iDisplay;
   1.119 +    EGLSurface iSurface;
   1.120 +    EGLContext iContext;
   1.121 +    TInt& iFinishedCounter;
   1.122 +    VGImage iVGImage;
   1.123 +    };
   1.124 +
   1.125 +#endif //__EGLTEST_STRESS_SGIMAGE_H__