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