Update contrib.
1 // Copyright (c) 2009 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.
21 #ifndef __EGLTEST_STRESS_SGIMAGE_H__
22 #define __EGLTEST_STRESS_SGIMAGE_H__
24 #include <VG/openvg.h>
25 #include <test/egltestcommonstep.h>
26 #include "egltest_stress_common_sgimage.h"
29 _LIT(KStressPixmapSurface, "StressPixmapSurface");
30 _LIT(KStressVGImage, "StressVGImage");
31 _LIT(KStressReadOnly, "StressReadOnly");
32 _LIT(KEStressReadWriteSingleImage, "StressReadWriteSingleImage");
33 _LIT(KStressReadWriteMultiImage, "StressReadWriteMultiImage");
36 _LIT(KPixelFormat, "PixelFormat");
37 _LIT(KNumberRSgImages, "NumberRSgImages");
38 _LIT(KNumberChildProcesses, "NumberChildProcesses");
39 _LIT(KNumberMainImages, "NumberMainImages");
40 _LIT(KRSgImageWidth, "RSgImageWidth");
41 _LIT(KRSgImageHeight, "RSgImageHeight");
43 //default section for sim load app ini file
44 _LIT(KDefaultSectionName,"default");
46 //supported pixel formats for these test cases
47 _LIT(KUidPixelFormatARGB_8888, "PixelFormatARGB_8888");
48 _LIT(KUidPixelFormatARGB_8888_PRE, "PixelFormatARGB_8888_PRE");
49 _LIT(KUidPixelFormatRGB_565, "PixelFormatRGB_565");
52 _LIT(KStressTestClientApp, "z:\\sys\\bin\\eglteststressprocesssgimage.exe");
55 _LIT(KStressTestMainAppPanic, "Stress Test Main App");
57 _LIT(KStress, "Stress");
58 NONSHARABLE_CLASS(CEglTest_Stress) : public CEglTestStep
62 TVerdict doTestStepL();
65 void PaintSurfaceL(EGLDisplay aDisplay, EGLSurface aSurface, EGLContext aContext);
66 void CreateChildProcessL(TInt aProcessNumber, TTestType aTestType, TSgDrawableId aDrawableId);
67 void CreateChildProcessesL();
68 void ClearDownArraysL(EGLDisplay aDisplay);
69 void CreateSimLoadAppL();
70 void CreateSimLoadProcessL(const TDesC& aApp);
71 void DestroySimLoadProcess();
72 void ReadIniValueL(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
73 void ReadIniValuesL();
74 void PrintConfigDataL();
75 void DeleteConfigData();
79 TInt iNumberRSgImages;
80 TInt iNumberChildProcesses;
81 TInt iNumberMainImages;
86 TUidPixelFormat iFormat;
87 VGImageFormat iVgFormat;
90 RArray<RSgImage> iSgImageArray;
91 RArray<VGImage> iVGImageArray;
92 RArray<EGLSurface> iSurfaceArray;
93 RArray<RProcess> iProcessArray;
94 RArray<RProcess> iProcessList;
98 class CTReadWriteMain : public CTReadWrite
101 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);
104 CTReadWriteMain(EGLDisplay aDisplay, EGLSurface aSurface, EGLContext aContext, TInt aWidth, TInt aHeight, TInt aByteSize, VGImageFormat aFormat, TBool& aTestPass, TInt& aFinishedCounter, const TTestType& aTestType);
105 void ConstructL(VGImage aVGImage);
106 void ReadImageFuncL();
108 void WriteImageFuncL();
110 void MakeCurrentL() const;
112 void PixmapSurfaceFuncL();
118 TInt& iFinishedCounter;
122 #endif //__EGLTEST_STRESS_SGIMAGE_H__