sl@0
|
1 |
// Copyright (c) 2007-2009 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 |
#ifndef TGRAPHICSRESOURCEMULTIPROCESSTHREAD_H
|
sl@0
|
17 |
#define TGRAPHICSRESOURCEMULTIPROCESSTHREAD_H
|
sl@0
|
18 |
|
sl@0
|
19 |
#include "sgimage.h"
|
sl@0
|
20 |
#include "sgimagecollection.h"
|
sl@0
|
21 |
#include "sgresource.h"
|
sl@0
|
22 |
#include <e32base.h>
|
sl@0
|
23 |
#include <graphics/sgresourceinternal.h>
|
sl@0
|
24 |
|
sl@0
|
25 |
//define default slot for multiprocess communication
|
sl@0
|
26 |
const TInt KSecondProcessFunctionSlot = 1;
|
sl@0
|
27 |
const TInt KSecondProcessParametersSlot = 2;
|
sl@0
|
28 |
|
sl@0
|
29 |
/**
|
sl@0
|
30 |
* Enums for passing between the test process and the second process used in testing,
|
sl@0
|
31 |
* used to define which test should be run on the second process.
|
sl@0
|
32 |
*/
|
sl@0
|
33 |
enum TSgresTestCase
|
sl@0
|
34 |
{
|
sl@0
|
35 |
ESgresSecondProcessOpenImage,
|
sl@0
|
36 |
ESgresSecondProcessOpenDrawable,
|
sl@0
|
37 |
ESgresSecondThreadOpenImage,
|
sl@0
|
38 |
ESgresSecondThreadOpenDrawable,
|
sl@0
|
39 |
ESgresSecondProcessOpenImageInvalid,
|
sl@0
|
40 |
ESgresSecondThreadOpenImageInvalid,
|
sl@0
|
41 |
ESgresSecondProcessMapImage,
|
sl@0
|
42 |
ESgresSecondThreadMapImage,
|
sl@0
|
43 |
ESgresSecondProcessUnmapImage,
|
sl@0
|
44 |
ESgresSecondThreadUnmapImage,
|
sl@0
|
45 |
ESgresSecondThreadOpenDrawableInvalid,
|
sl@0
|
46 |
ESgresSecondProcessOpenDrawableInvalid,
|
sl@0
|
47 |
ESgresSecondProcessPanicDriverUnclosedResources,
|
sl@0
|
48 |
ESgresSecondProcessPanicMemoryLeak,
|
sl@0
|
49 |
ESgresSecondThreadPanicDrawableOpenNoDriver,
|
sl@0
|
50 |
ESgresSecondThreadPanicImageOpenNoDriver1,
|
sl@0
|
51 |
ESgresSecondThreadPanicImageOpenNoDriver2,
|
sl@0
|
52 |
ESgresSecondThreadPanicImageGetInterfaceInvalidHandle,
|
sl@0
|
53 |
ESgresSecondThreadPanicImageGetInterfaceNoDriver,
|
sl@0
|
54 |
ESgresSecondThreadPanicImageCloseInvalidHandle,
|
sl@0
|
55 |
ESgresSecondThreadPanicImageCloseNoDriver,
|
sl@0
|
56 |
ESgresSecondThreadPanicImageIdInvalidHandle,
|
sl@0
|
57 |
ESgresSecondThreadPanicImageIdNoDriver,
|
sl@0
|
58 |
ESgresSecondThreadPanicImageDrawableTypeNoDriver,
|
sl@0
|
59 |
ESgresSecondThreadPanicImageDrawableTypeInvalidHandle,
|
sl@0
|
60 |
ESgresSecondThreadPanicImageCreateNoDriver1,
|
sl@0
|
61 |
ESgresSecondThreadPanicImageCreateNoDriver2,
|
sl@0
|
62 |
ESgresSecondThreadPanicImageCreateInvalidHandle,
|
sl@0
|
63 |
ESgresSecondThreadPanicImageGetInfoInvalidHandle,
|
sl@0
|
64 |
ESgresSecondThreadPanicImageGetInfoNoDriver,
|
sl@0
|
65 |
ESgresSecondThreadPanicImageGetPixelFormatsNoDriver,
|
sl@0
|
66 |
ESgresSecondThreadPanicImageMapReadOnlyInvalidHandle,
|
sl@0
|
67 |
ESgresSecondThreadPanicImageMapReadOnlyNoDriver,
|
sl@0
|
68 |
ESgresSecondThreadPanicImageMapWriteOnlyInvalidHandle,
|
sl@0
|
69 |
ESgresSecondThreadPanicImageMapWriteOnlyNoDriver,
|
sl@0
|
70 |
ESgresSecondThreadPanicImageMapReadWriteInvalidHandle,
|
sl@0
|
71 |
ESgresSecondThreadPanicImageMapReadWriteNoDriver,
|
sl@0
|
72 |
ESgresSecondThreadPanicImageUnmapInvalidHandle,
|
sl@0
|
73 |
ESgresSecondThreadPanicImageUnmapNoDriver,
|
sl@0
|
74 |
ESgresSecondThreadPanicImageCollectionCreateNoDriver1,
|
sl@0
|
75 |
ESgresSecondThreadPanicImageCollectionCreateNoDriver2,
|
sl@0
|
76 |
ESgresSecondThreadPanicImageCollectionCloseInvalidHandle,
|
sl@0
|
77 |
ESgresSecondThreadPanicImageCollectionCloseNoDriver,
|
sl@0
|
78 |
ESgresSecondThreadPanicImageCollectionSurfaceIdInvalidHandle,
|
sl@0
|
79 |
ESgresSecondThreadPanicImageCollectionSurfaceIdNoDriver,
|
sl@0
|
80 |
ESgresSecondThreadPanicImageCollectionGetInfoInvalidHandle,
|
sl@0
|
81 |
ESgresSecondThreadPanicImageCollectionGetInfoNoDriver,
|
sl@0
|
82 |
ESgresSecondThreadPanicImageCollectionCountInvalidHandle,
|
sl@0
|
83 |
ESgresSecondThreadPanicImageCollectionCountNoDriver,
|
sl@0
|
84 |
ESgresSecondThreadPanicImageCollectionOpenImageInvalidHandle,
|
sl@0
|
85 |
ESgresSecondThreadPanicImageCollectionOpenImageNoDriver,
|
sl@0
|
86 |
ESgresSecondThreadPanicResourceCountNoDriver,
|
sl@0
|
87 |
ESgresSecondThreadPanicAllocMarkStartNoDriver,
|
sl@0
|
88 |
ESgresSecondThreadPanicAllocMarkEndNoDriver,
|
sl@0
|
89 |
ESgresSecondThreadPanicSetAllocFailNoDriver,
|
sl@0
|
90 |
ESgresMultipleThreadStressTest,
|
sl@0
|
91 |
};
|
sl@0
|
92 |
|
sl@0
|
93 |
/**
|
sl@0
|
94 |
* Enums for the test results. Used in multi-thread or multi-process tests.
|
sl@0
|
95 |
* Each test function call may contain several sub-tests. Each EXXXTestPassed
|
sl@0
|
96 |
* will be bitwised ored to the test result as each sub-test passes.
|
sl@0
|
97 |
*/
|
sl@0
|
98 |
enum TSgresTestResult
|
sl@0
|
99 |
{
|
sl@0
|
100 |
EFirstTestPassed = 0x00000001,
|
sl@0
|
101 |
ESecondTestPassed = 0x00000002,
|
sl@0
|
102 |
EThirdTestPassed = 0x00000004,
|
sl@0
|
103 |
EFourthTestPassed = 0x00000008,
|
sl@0
|
104 |
EFifthTestPassed = 0x00000010,
|
sl@0
|
105 |
ESixthTestPassed = 0x00000020,
|
sl@0
|
106 |
ESeventhTestPassed = 0x00000040,
|
sl@0
|
107 |
EEighthTestPassed = 0x00000080,
|
sl@0
|
108 |
ENinthTestPassed = 0x00000100,
|
sl@0
|
109 |
ETenthTestPassed = 0x00000200,
|
sl@0
|
110 |
EEleventhTestPassed = 0x00000400,
|
sl@0
|
111 |
ETwelvethTestPassed = 0x00000800,
|
sl@0
|
112 |
EThirteenthTestPassed = 0x00001000,
|
sl@0
|
113 |
EFourteenthTestPassed = 0x00002000,
|
sl@0
|
114 |
EFifteenthTestPassed = 0x00004000,
|
sl@0
|
115 |
};
|
sl@0
|
116 |
|
sl@0
|
117 |
|
sl@0
|
118 |
/**
|
sl@0
|
119 |
* Class for passing test info to other threads or processes.
|
sl@0
|
120 |
*/
|
sl@0
|
121 |
struct TSgresTestInfo
|
sl@0
|
122 |
{
|
sl@0
|
123 |
TSgDrawableId iDrawableId;
|
sl@0
|
124 |
TSgImageInfo iImageInfo;
|
sl@0
|
125 |
TInt iImageCount;
|
sl@0
|
126 |
TSgresTestCase iTestCase;
|
sl@0
|
127 |
TBool iPanic;
|
sl@0
|
128 |
};
|
sl@0
|
129 |
|
sl@0
|
130 |
#endif
|