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 |
@internalComponent - Internal Symbian test code
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#include "egltest_endpointimage.h"
|
sl@0
|
23 |
|
sl@0
|
24 |
|
sl@0
|
25 |
static const TTestCase KImagePositiveCases[] =
|
sl@0
|
26 |
{
|
sl@0
|
27 |
{
|
sl@0
|
28 |
TESTIDS("565A"),
|
sl@0
|
29 |
CASETITLE("Functional: Positive: Image content preservation with single update"),
|
sl@0
|
30 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
31 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeEglWindow, ESurfTypeRawSingleBuffered),
|
sl@0
|
32 |
{
|
sl@0
|
33 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
34 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
35 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
36 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
37 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
38 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
39 |
|
sl@0
|
40 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
41 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
42 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
43 |
|
sl@0
|
44 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
45 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
46 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
47 |
|
sl@0
|
48 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
49 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
50 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
51 |
|
sl@0
|
52 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
53 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
54 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
55 |
|
sl@0
|
56 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
57 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
58 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
59 |
{ EFinishedCase }
|
sl@0
|
60 |
},
|
sl@0
|
61 |
},
|
sl@0
|
62 |
{
|
sl@0
|
63 |
TESTIDS("566A"),
|
sl@0
|
64 |
CASETITLE("Functional: Positive: Image content preservation with multiple updates"),
|
sl@0
|
65 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
66 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeRawSingleBuffered, ESurfTypeEglWindow),
|
sl@0
|
67 |
{
|
sl@0
|
68 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
69 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
70 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
71 |
// Draw and compare four times.
|
sl@0
|
72 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
73 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
74 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
75 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
76 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
77 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
78 |
|
sl@0
|
79 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
80 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
81 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
82 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
83 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
84 |
|
sl@0
|
85 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
86 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
87 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
88 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
89 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
90 |
|
sl@0
|
91 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
92 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
93 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
94 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
95 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
96 |
|
sl@0
|
97 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
98 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
99 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
100 |
{ EFinishedCase }
|
sl@0
|
101 |
},
|
sl@0
|
102 |
},
|
sl@0
|
103 |
{
|
sl@0
|
104 |
TESTIDS("567A"),
|
sl@0
|
105 |
CASETITLE("Functional: Positive: Image content preservation in multiple endpoints with single update"),
|
sl@0
|
106 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
107 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeRawSingleBuffered, ESurfTypeEglWindow),
|
sl@0
|
108 |
{
|
sl@0
|
109 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
110 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
111 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 1, EStandardSurface },
|
sl@0
|
112 |
{ ECreateEndpointCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
113 |
{ ECreateEndpointCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
114 |
// Draw and compare four times.
|
sl@0
|
115 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
116 |
{ EDrawContentCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
117 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
118 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
119 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
120 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
121 |
|
sl@0
|
122 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
123 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
124 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 0},
|
sl@0
|
125 |
{ ECompareImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
126 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
127 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
128 |
|
sl@0
|
129 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
130 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
131 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 0},
|
sl@0
|
132 |
{ ECompareImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
133 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
134 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
135 |
|
sl@0
|
136 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
137 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
138 |
{ ECompareImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
139 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
140 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
141 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
142 |
|
sl@0
|
143 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
144 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
145 |
{ ECompareImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
146 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 0},
|
sl@0
|
147 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
148 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
149 |
|
sl@0
|
150 |
{ EEndStreamingCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
151 |
{ EEndStreamingCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
152 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
153 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
154 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
155 |
{ EFinishedCase }
|
sl@0
|
156 |
},
|
sl@0
|
157 |
},
|
sl@0
|
158 |
{
|
sl@0
|
159 |
TESTIDS("567B"),
|
sl@0
|
160 |
CASETITLE("Functional: Positive: Image content preservation in multiple endpoints with multiple updates"),
|
sl@0
|
161 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
162 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeRawSingleBuffered, ESurfTypeEglWindow),
|
sl@0
|
163 |
{
|
sl@0
|
164 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
165 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
166 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 1, EStandardSurface },
|
sl@0
|
167 |
{ ECreateEndpointCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
168 |
{ ECreateEndpointCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
169 |
// Draw and compare four times.
|
sl@0
|
170 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
171 |
{ EDrawContentCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
172 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
173 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
174 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
175 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
176 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
177 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
178 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 0},
|
sl@0
|
179 |
{ ECompareImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
180 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
181 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
182 |
|
sl@0
|
183 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 2 },
|
sl@0
|
184 |
{ EDrawContentCase, 0, EGL_SUCCESS, 1, 3 },
|
sl@0
|
185 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
186 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
187 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
188 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
189 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
190 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
191 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 2},
|
sl@0
|
192 |
{ ECompareImageCase, 0, EGL_SUCCESS, 1, 3 },
|
sl@0
|
193 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
194 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
195 |
|
sl@0
|
196 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
197 |
{ EDrawContentCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
198 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
199 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
200 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
201 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
202 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
203 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
204 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 0},
|
sl@0
|
205 |
{ ECompareImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
206 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
207 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
208 |
|
sl@0
|
209 |
{ EEndStreamingCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
210 |
{ EEndStreamingCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
211 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
212 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
213 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
214 |
{ EFinishedCase }
|
sl@0
|
215 |
},
|
sl@0
|
216 |
},
|
sl@0
|
217 |
//569 tests cause a panic
|
sl@0
|
218 |
{
|
sl@0
|
219 |
TESTIDS("569A"),
|
sl@0
|
220 |
CASETITLE("Functional: Positive: VGImage handle remains valid after EGLImage goes out of scope"),
|
sl@0
|
221 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
222 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeRawSingleBuffered, ESurfTypeEglWindow),
|
sl@0
|
223 |
{
|
sl@0
|
224 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
225 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
226 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
227 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
228 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
229 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
230 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
231 |
{ ECreateVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
232 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
233 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
234 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
235 |
{ ETestVgImageValidCase, 0, EGL_SUCCESS },
|
sl@0
|
236 |
{ EDestroyVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
237 |
{ ECreateVgImageCase, EExpectError, VG_BAD_HANDLE_ERROR },
|
sl@0
|
238 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
239 |
{ EFinishedCase }
|
sl@0
|
240 |
}
|
sl@0
|
241 |
},
|
sl@0
|
242 |
{
|
sl@0
|
243 |
TESTIDS("569B"),
|
sl@0
|
244 |
CASETITLE("Functional: Positive: VGImage handle remains valid after EGLImage goes out of scope"),
|
sl@0
|
245 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
246 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeRawSingleBuffered, ESurfTypeEglWindow),
|
sl@0
|
247 |
{
|
sl@0
|
248 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
249 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
250 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
251 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
252 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
253 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
254 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
255 |
{ ECreateVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
256 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
257 |
{ ETestVgImageValidCase, 0, EGL_SUCCESS },
|
sl@0
|
258 |
{ EDestroyVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
259 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
260 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
261 |
{ ECreateVgImageCase, EExpectError, VG_BAD_HANDLE_ERROR },
|
sl@0
|
262 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
263 |
{ EFinishedCase }
|
sl@0
|
264 |
}
|
sl@0
|
265 |
},
|
sl@0
|
266 |
{
|
sl@0
|
267 |
TESTIDS("569C"),
|
sl@0
|
268 |
CASETITLE("Functional: Positive: VGImage handle remains valid after EGLImage goes out of scope"),
|
sl@0
|
269 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
270 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeRawSingleBuffered, ESurfTypeEglWindow),
|
sl@0
|
271 |
{
|
sl@0
|
272 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
273 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
274 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
275 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
276 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
277 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
278 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
279 |
{ ECreateVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
280 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
281 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
282 |
{ ETestVgImageValidCase, 0, EGL_SUCCESS },
|
sl@0
|
283 |
{ EDestroyVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
284 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
285 |
{ ECreateVgImageCase, EExpectError, VG_BAD_HANDLE_ERROR },
|
sl@0
|
286 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
287 |
{ EFinishedCase }
|
sl@0
|
288 |
}
|
sl@0
|
289 |
},
|
sl@0
|
290 |
{
|
sl@0
|
291 |
TESTIDS("569D"),
|
sl@0
|
292 |
CASETITLE("Functional: Positive: VGImage handle remains valid after EGLImage goes out of scope with two VG images"),
|
sl@0
|
293 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
294 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeRawSingleBuffered, ESurfTypeEglWindow),
|
sl@0
|
295 |
{
|
sl@0
|
296 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
297 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
298 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
299 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
300 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
301 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
302 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
303 |
{ ECreateVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
304 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
305 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
306 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
307 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
308 |
{ ECreateVgImageCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
309 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
310 |
{ ETestVgImageValidCase, 0, EGL_SUCCESS },
|
sl@0
|
311 |
{ ETestVgImageValidCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
312 |
{ EDestroyVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
313 |
{ EDestroyVgImageCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
314 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
315 |
{ ECreateVgImageCase, EExpectError, VG_BAD_HANDLE_ERROR },
|
sl@0
|
316 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
317 |
{ EFinishedCase }
|
sl@0
|
318 |
}
|
sl@0
|
319 |
},
|
sl@0
|
320 |
{
|
sl@0
|
321 |
TESTIDS("569E"),
|
sl@0
|
322 |
CASETITLE("Functional: Positive: VGImage handle remains valid after EGLImage goes out of scope with two VG images"),
|
sl@0
|
323 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
324 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeRawSingleBuffered, ESurfTypeEglWindow),
|
sl@0
|
325 |
{
|
sl@0
|
326 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
327 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
328 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
329 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
330 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
331 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
332 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
333 |
{ ECreateVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
334 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
335 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
336 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
337 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
338 |
{ ECreateVgImageCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
339 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
340 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
341 |
{ ETestVgImageValidCase, 0, EGL_SUCCESS },
|
sl@0
|
342 |
{ ETestVgImageValidCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
343 |
{ EDestroyVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
344 |
{ EDestroyVgImageCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
345 |
{ ECreateVgImageCase, EExpectError, VG_BAD_HANDLE_ERROR },
|
sl@0
|
346 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
347 |
{ EFinishedCase }
|
sl@0
|
348 |
}
|
sl@0
|
349 |
},
|
sl@0
|
350 |
{
|
sl@0
|
351 |
TESTIDS("569F"),
|
sl@0
|
352 |
CASETITLE("Functional: Positive: VGImage handle remains valid after EGLImage goes out of scope with two VG images"),
|
sl@0
|
353 |
// TODO: Add video- and viewfinder surfaces.
|
sl@0
|
354 |
SurfaceTypes3(ESurfTypeRaw, ESurfTypeRawSingleBuffered, ESurfTypeEglWindow),
|
sl@0
|
355 |
{
|
sl@0
|
356 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
357 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
358 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
359 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
360 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
361 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
362 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
363 |
{ ECreateVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
364 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
365 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
366 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
367 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
368 |
{ ECreateVgImageCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
369 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
370 |
{ ETestVgImageValidCase, 0, EGL_SUCCESS },
|
sl@0
|
371 |
{ EDestroyVgImageCase, 0, EGL_SUCCESS },
|
sl@0
|
372 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
373 |
{ ETestVgImageValidCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
374 |
{ EDestroyVgImageCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
375 |
{ ECreateVgImageCase, EExpectError, VG_BAD_HANDLE_ERROR },
|
sl@0
|
376 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
377 |
{ EFinishedCase }
|
sl@0
|
378 |
}
|
sl@0
|
379 |
},
|
sl@0
|
380 |
{
|
sl@0
|
381 |
TESTIDS("570"),
|
sl@0
|
382 |
CASETITLE("Functional: Positive: Acquired EGLImage is not corrupted by submitting new content to surface"),
|
sl@0
|
383 |
// TODO: Add triple buffered, video- and viewfinder surfaces.
|
sl@0
|
384 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
385 |
{
|
sl@0
|
386 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
387 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
388 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
389 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
390 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
391 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
392 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
393 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
394 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
395 |
{ EContentUpdateCase, ENoSync, EGL_SUCCESS },
|
sl@0
|
396 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
397 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
398 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
399 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 1 },
|
sl@0
|
400 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
401 |
|
sl@0
|
402 |
{ EEndStreamingCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
403 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
404 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
405 |
{ EFinishedCase }
|
sl@0
|
406 |
},
|
sl@0
|
407 |
},
|
sl@0
|
408 |
};
|
sl@0
|
409 |
|
sl@0
|
410 |
|
sl@0
|
411 |
static const TTestCases KTestCases[] =
|
sl@0
|
412 |
{
|
sl@0
|
413 |
TestCase(KImagePositiveCases),
|
sl@0
|
414 |
};
|
sl@0
|
415 |
|
sl@0
|
416 |
const TInt KNumberTestCases = sizeof(KTestCases) / sizeof(KTestCases[0]);
|
sl@0
|
417 |
|
sl@0
|
418 |
|
sl@0
|
419 |
CEglTest_LocalTestStep_EndpointImage::CEglTest_LocalTestStep_EndpointImage():
|
sl@0
|
420 |
CEgltest_Local_Engine(KTestCases, KNumberTestCases)
|
sl@0
|
421 |
{
|
sl@0
|
422 |
}
|
sl@0
|
423 |
|
sl@0
|
424 |
|
sl@0
|
425 |
// Class for lifetime testing - we need to create another process and use endpoints from that process...
|
sl@0
|
426 |
_LIT(KEglEndpointLifetimeExe, "eglendpointlifetimetesthelper.exe");
|
sl@0
|
427 |
|
sl@0
|
428 |
|
sl@0
|
429 |
CEglTest_LocalTestStep_EndpointImageLifetime::CEglTest_LocalTestStep_EndpointImageLifetime()
|
sl@0
|
430 |
: CLocalTestStepBase(ETestUidEndpointEngine) // We use the engine to do the remote side functionality.
|
sl@0
|
431 |
{
|
sl@0
|
432 |
}
|
sl@0
|
433 |
|
sl@0
|
434 |
void CEglTest_LocalTestStep_EndpointImageLifetime::DoPreambleL()
|
sl@0
|
435 |
{
|
sl@0
|
436 |
//Register the test id.
|
sl@0
|
437 |
_LIT(KTestId, "568");
|
sl@0
|
438 |
RegisterTestIdsL(KTestId);
|
sl@0
|
439 |
SetCurrentTestIds(KTestId);
|
sl@0
|
440 |
|
sl@0
|
441 |
TInt err= iProcessResultInQueue.CreateGlobal(KResultProcessQueueName, 5);
|
sl@0
|
442 |
User::LeaveIfError(err);
|
sl@0
|
443 |
err = iProcessParamsOutQueue.CreateGlobal(KParamsProcessQueueName, 1);
|
sl@0
|
444 |
User::LeaveIfError(err);
|
sl@0
|
445 |
}
|
sl@0
|
446 |
|
sl@0
|
447 |
|
sl@0
|
448 |
void CEglTest_LocalTestStep_EndpointImageLifetime::DoPostambleL()
|
sl@0
|
449 |
{
|
sl@0
|
450 |
iProcessResultInQueue.Close();
|
sl@0
|
451 |
iProcessParamsOutQueue.Close();
|
sl@0
|
452 |
}
|
sl@0
|
453 |
|
sl@0
|
454 |
CEglTest_LocalTestStep_EndpointImageLifetime::~CEglTest_LocalTestStep_EndpointImageLifetime()
|
sl@0
|
455 |
{
|
sl@0
|
456 |
iProcessResultInQueue.Close();
|
sl@0
|
457 |
iProcessParamsOutQueue.Close();
|
sl@0
|
458 |
}
|
sl@0
|
459 |
|
sl@0
|
460 |
void CEglTest_LocalTestStep_EndpointImageLifetime::RunScript(
|
sl@0
|
461 |
const TEngineTestCase *aTestCases,
|
sl@0
|
462 |
TRemoteTestParams ¶ms)
|
sl@0
|
463 |
{
|
sl@0
|
464 |
for(TInt i = 0; aTestCases[i].iCase != EFinishedCase; i++)
|
sl@0
|
465 |
{
|
sl@0
|
466 |
params.iEndpointEngine.iEngineTestCase = aTestCases[i];
|
sl@0
|
467 |
RunRemoteTestCase(aTestCases[i].iCase, params);
|
sl@0
|
468 |
}
|
sl@0
|
469 |
}
|
sl@0
|
470 |
|
sl@0
|
471 |
void CEglTest_LocalTestStep_EndpointImageLifetime::EndpointLifetimeTestL(TSurfaceType aSurfaceType, TInt aExitType)
|
sl@0
|
472 |
{
|
sl@0
|
473 |
// Create an external process that creates a surface.
|
sl@0
|
474 |
TInt err = iProcessStatus.iProcess.Create(KEglEndpointLifetimeExe, KNullDesC);
|
sl@0
|
475 |
User::LeaveIfError(err);
|
sl@0
|
476 |
iProcessStatus.iProcess.Logon(iProcessStatus.iStatus);
|
sl@0
|
477 |
iProcessStatus.iProcess.Resume();
|
sl@0
|
478 |
|
sl@0
|
479 |
|
sl@0
|
480 |
iProcessResultInQueue.SendBlocking(aSurfaceType);
|
sl@0
|
481 |
|
sl@0
|
482 |
TSurfaceId id;
|
sl@0
|
483 |
iProcessParamsOutQueue.ReceiveBlocking(id);
|
sl@0
|
484 |
// Now perform a bit of engine stuff...
|
sl@0
|
485 |
|
sl@0
|
486 |
TRemoteTestParams params = {};
|
sl@0
|
487 |
|
sl@0
|
488 |
params.iEndpointEngine.iSurfaceParams.iSurfaceId = id;
|
sl@0
|
489 |
|
sl@0
|
490 |
static const TEngineTestCase createEndpointSteps[] =
|
sl@0
|
491 |
{
|
sl@0
|
492 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
493 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
494 |
{ EFinishedCase, 0, EGL_SUCCESS },
|
sl@0
|
495 |
};
|
sl@0
|
496 |
|
sl@0
|
497 |
RunScript(createEndpointSteps, params);
|
sl@0
|
498 |
|
sl@0
|
499 |
// Now that we have an endpoint, we can continue the other process.
|
sl@0
|
500 |
iProcessResultInQueue.SendBlocking(aExitType);
|
sl@0
|
501 |
|
sl@0
|
502 |
User::WaitForRequest(iProcessStatus.iStatus);
|
sl@0
|
503 |
|
sl@0
|
504 |
INFO_PRINTF2(_L("External Process finished with status = %d"), iProcessStatus.iStatus.Int());
|
sl@0
|
505 |
|
sl@0
|
506 |
// Check the endpoint content.
|
sl@0
|
507 |
static const TEngineTestCase checkEndpointSteps[] =
|
sl@0
|
508 |
{
|
sl@0
|
509 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
510 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
511 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
512 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
513 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
514 |
{ EFinishedCase, 0, EGL_SUCCESS },
|
sl@0
|
515 |
};
|
sl@0
|
516 |
|
sl@0
|
517 |
RunScript(checkEndpointSteps, params);
|
sl@0
|
518 |
}
|
sl@0
|
519 |
|
sl@0
|
520 |
TVerdict CEglTest_LocalTestStep_EndpointImageLifetime::doTestStepL()
|
sl@0
|
521 |
{
|
sl@0
|
522 |
static const TRemoteTestParams nullParams = {};
|
sl@0
|
523 |
StartRemoteTestStep(nullParams);
|
sl@0
|
524 |
|
sl@0
|
525 |
TSurfaceType surfaceTypes[] = { ESurfTypeEglWindow, ESurfTypeRaw, ESurfTypeRawSingleBuffered };
|
sl@0
|
526 |
for(TInt i = 0; i < sizeof(surfaceTypes) / sizeof(surfaceTypes[0]); i++)
|
sl@0
|
527 |
{
|
sl@0
|
528 |
TSurfaceType sType = surfaceTypes[i];
|
sl@0
|
529 |
EndpointLifetimeTestL(sType, EEndpointLifetimeNormalExit);
|
sl@0
|
530 |
EndpointLifetimeTestL(sType, EEnfpointLifetimePanicExit);
|
sl@0
|
531 |
}
|
sl@0
|
532 |
|
sl@0
|
533 |
EndRemoteTestStep(nullParams);
|
sl@0
|
534 |
INFO_PRINTF1(_L("Lifetime test finished"));
|
sl@0
|
535 |
return TestStepResult();
|
sl@0
|
536 |
}
|