os/graphics/egl/egltest/endpointtestsuite/automated/tsrc/egltest_endpointacquire_local.cpp
Update contrib.
1 // Copyright (c) 2009-2010 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.
19 @internalComponent - Internal Symbian test code
22 #include "egltest_endpointacquire.h"
25 static const TTestCase KAcquirePositiveCases[] =
27 // Test "working case"
30 CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Basic Working case"),
31 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
33 { EInitializeCase, 0, EGL_SUCCESS },
34 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
35 { ECreateEndpointCase, 0, EGL_SUCCESS },
36 { EDrawContentCase, 0, EGL_SUCCESS },
37 { EContentUpdateCase, 0, EGL_SUCCESS },
38 { EBeginStreamingCase, 0, EGL_SUCCESS },
39 { EAcquireImageCase, 0, EGL_SUCCESS },
40 { ECompareImageCase, 0, EGL_SUCCESS },
41 { EReleaseImageCase, 0, EGL_SUCCESS },
42 { EEndStreamingCase, 0, EGL_SUCCESS },
43 { EDestroyEndpointCase, 0, EGL_SUCCESS },
44 { ETerminateCase, 0, EGL_SUCCESS },
48 // Positive: Acquire twice with release
51 CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Acquire twice (with release)"),
52 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
54 { EInitializeCase, 0, EGL_SUCCESS },
55 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
56 { ECreateEndpointCase, 0, EGL_SUCCESS },
57 { EDrawContentCase, 0, EGL_SUCCESS },
58 { EContentUpdateCase, 0, EGL_SUCCESS },
59 { EBeginStreamingCase, 0, EGL_SUCCESS },
60 { EAcquireImageCase, 0, EGL_SUCCESS },
61 { ECompareImageCase, 0, EGL_SUCCESS },
62 { EDrawContentCase, 0, EGL_SUCCESS },
63 { EContentUpdateCase, ENoSync, EGL_SUCCESS },
64 { EReleaseImageCase, 0, EGL_SUCCESS },
65 { EAcquireImageCase, 0, EGL_SUCCESS },
66 { ECompareImageCase, 0, EGL_SUCCESS },
67 { EReleaseImageCase, 0, EGL_SUCCESS },
68 { EEndStreamingCase, 0, EGL_SUCCESS },
69 { EDestroyEndpointCase, 0, EGL_SUCCESS },
70 { ETerminateCase, 0, EGL_SUCCESS },
76 CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Two endpoints, acquire from each of them"),
77 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
79 { EInitializeCase, 0, EGL_SUCCESS },
80 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface},
81 { ECreateSurfaceCase, 0, EGL_SUCCESS, 1, EStandardSurface },
82 { ECreateEndpointCase, 0, EGL_SUCCESS, 0, 0}, // Endpoint 0, image(surface) 0
83 { ECreateEndpointCase, 0, EGL_SUCCESS, 1, 1}, // Endpoint 1, image(surface) 1
84 { EDrawContentCase, 0, EGL_SUCCESS, 0, 0 }, // Surface 0, Image 0
85 { EContentUpdateCase, 0, EGL_SUCCESS, 0 }, // Surface 0
86 { EDrawContentCase, 0, EGL_SUCCESS, 1, 1 }, // Surface 1, Image 1
87 { EContentUpdateCase, 0, EGL_SUCCESS, 1 }, // Surface 1
88 { EBeginStreamingCase, 0, EGL_SUCCESS, 0 }, // Endpoint 0.
89 { EBeginStreamingCase, 0, EGL_SUCCESS, 1 }, // Endpoint 1.
90 { EAcquireImageCase, 0, EGL_SUCCESS, 1 }, // Endpoint 1
91 { EAcquireImageCase, 0, EGL_SUCCESS, 0 }, // Endpoint 0
92 { ECompareImageCase, 0, EGL_SUCCESS, 0, 0 }, // eglImage 0, image 0
93 { ECompareImageCase, 0, EGL_SUCCESS, 1, 1 }, // eglImage 1, image 1
94 { EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 }, // Endpoint 0, image 0
95 { EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 }, // Endpoint 1, image 1
96 { EEndStreamingCase, 0, EGL_SUCCESS, 0 }, // Endpoint 0
97 { EEndStreamingCase, 0, EGL_SUCCESS, 1 }, // Endpoint 1
98 { EDestroyEndpointCase, 0, EGL_SUCCESS, 0 }, // Endpoint 0
99 { EDestroyEndpointCase, 0, EGL_SUCCESS, 1 }, // Endpoint 1
100 { ETerminateCase, 0, EGL_SUCCESS },
104 // Positive: Acquire, early destroy...
107 CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Acquire and destroy without release"),
108 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
110 { EInitializeCase, 0, EGL_SUCCESS },
111 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
112 { ECreateEndpointCase, 0, EGL_SUCCESS },
113 { EDrawContentCase, 0, EGL_SUCCESS },
114 { EContentUpdateCase, 0, EGL_SUCCESS },
115 { EBeginStreamingCase, 0, EGL_SUCCESS },
116 { EAcquireImageCase, 0, EGL_SUCCESS },
117 { ECompareImageCase, 0, EGL_SUCCESS },
118 { EDestroyEndpointCase, 0, EGL_SUCCESS },
119 { ETerminateCase, 0, EGL_SUCCESS },
123 // Positive: Acquire, early endstreaming...
126 CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Acquire and endstreaming without release"),
127 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
129 { EInitializeCase, 0, EGL_SUCCESS },
130 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
131 { ECreateEndpointCase, 0, EGL_SUCCESS },
132 { EDrawContentCase, 0, EGL_SUCCESS },
133 { EContentUpdateCase, 0, EGL_SUCCESS },
134 { EBeginStreamingCase, 0, EGL_SUCCESS },
135 { EAcquireImageCase, 0, EGL_SUCCESS },
136 { ECompareImageCase, 0, EGL_SUCCESS },
137 { EEndStreamingCase, 0, EGL_SUCCESS },
138 { EBeginStreamingCase, 0, EGL_SUCCESS }, // We need to acquire again to see that it actually works correctly.
139 { EAcquireImageCase, 0, EGL_SUCCESS },
140 { ECompareImageCase, 0, EGL_SUCCESS },
141 { EReleaseImageCase, 0, EGL_SUCCESS },
142 { EDestroyEndpointCase, 0, EGL_SUCCESS },
143 { ETerminateCase, 0, EGL_SUCCESS },
150 static const TTestCase KAcquireNegativeCases[] =
154 CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Not ready"),
155 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
157 { EInitializeCase, 0, EGL_SUCCESS },
158 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
159 { ECreateEndpointCase, 0, EGL_SUCCESS },
160 { EAcquireImageCase, EExpectError, EGL_BAD_ACCESS },
161 { EDestroyEndpointCase, 0, EGL_SUCCESS },
162 { ETerminateCase, 0, EGL_SUCCESS },
168 CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Not streaming"),
169 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
171 { EInitializeCase, 0, EGL_SUCCESS },
172 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
173 { ECreateEndpointCase, 0, EGL_SUCCESS },
174 { EDrawContentCase, 0, EGL_SUCCESS },
175 { EContentUpdateCase, 0, EGL_SUCCESS },
176 { EAcquireImageCase, EExpectError, EGL_BAD_ACCESS },
177 { EDestroyEndpointCase, 0, EGL_SUCCESS },
178 { ETerminateCase, 0, EGL_SUCCESS },
182 // Negative: Acquire twice with no release
185 CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Acquire twice (no release)"),
186 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
188 { EInitializeCase, 0, EGL_SUCCESS },
189 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
190 { ECreateEndpointCase, 0, EGL_SUCCESS },
191 { EDrawContentCase, 0, EGL_SUCCESS },
192 { EContentUpdateCase, 0, EGL_SUCCESS },
193 { EBeginStreamingCase, 0, EGL_SUCCESS },
194 { EAcquireImageCase, 0, EGL_SUCCESS },
195 { ECompareImageCase, 0, EGL_SUCCESS },
196 // Note that when a bad acquire is done, the eglimage value is not stored.
197 // so we can still use the same image slot for the release later on.
198 { EAcquireImageCase, EExpectError, EGL_BAD_ACCESS },
199 { EReleaseImageCase, 0, EGL_SUCCESS },
200 { EEndStreamingCase, 0, EGL_SUCCESS },
201 { EDestroyEndpointCase, 0, EGL_SUCCESS },
202 { ETerminateCase, 0, EGL_SUCCESS },
206 // Negative: Release bad eglImage then release the proper one, and acquire another (to ensure all worked).
209 CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: release bad image then release correct one"),
210 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
212 { EInitializeCase, 0, EGL_SUCCESS },
213 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
214 { ECreateEndpointCase, 0, EGL_SUCCESS },
215 { EDrawContentCase, 0, EGL_SUCCESS },
216 { EContentUpdateCase, 0, EGL_SUCCESS },
217 { EBeginStreamingCase, 0, EGL_SUCCESS },
218 { EAcquireImageCase, 0, EGL_SUCCESS },
219 { ECompareImageCase, 0, EGL_SUCCESS },
220 { EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
221 { EReleaseImageCase, 0, EGL_SUCCESS },
222 { EEndStreamingCase, 0, EGL_SUCCESS },
223 { EDestroyEndpointCase, 0, EGL_SUCCESS },
224 { ETerminateCase, 0, EGL_SUCCESS },
230 static const TTestCase KAcquireBadParamCases[] =
234 CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Various bad Parameters(Not Ready state)"),
235 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
237 { EInitializeCase, 0, EGL_SUCCESS },
238 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
239 { ECreateEndpointCase, 0, EGL_SUCCESS },
240 { EAcquireImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
241 { EAcquireImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
242 { EAcquireImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
243 { EDestroyEndpointCase, 0, EGL_SUCCESS },
244 { ETerminateCase, 0, EGL_SUCCESS },
250 CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Various bad Parameters(Ready state)"),
251 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
253 { EInitializeCase, 0, EGL_SUCCESS },
254 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
255 { ECreateEndpointCase, 0, EGL_SUCCESS },
256 { EDrawContentCase, 0, EGL_SUCCESS },
257 { EContentUpdateCase, 0, EGL_SUCCESS },
258 { EAcquireImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
259 { EAcquireImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
260 { EAcquireImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
261 { EDestroyEndpointCase, 0, EGL_SUCCESS },
262 { ETerminateCase, 0, EGL_SUCCESS },
268 CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Various bad Parameters(Streaming state)"),
269 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
271 { EInitializeCase, 0, EGL_SUCCESS },
272 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
273 { ECreateEndpointCase, 0, EGL_SUCCESS },
274 { EDrawContentCase, 0, EGL_SUCCESS },
275 { EContentUpdateCase, 0, EGL_SUCCESS },
276 { EBeginStreamingCase, 0, EGL_SUCCESS },
277 { EAcquireImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
278 { EAcquireImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
279 { EAcquireImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
280 { EDestroyEndpointCase, 0, EGL_SUCCESS },
281 { ETerminateCase, 0, EGL_SUCCESS },
287 CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Various bad Parameters(Image Acquired state)"),
288 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
290 { EInitializeCase, 0, EGL_SUCCESS },
291 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
292 { ECreateEndpointCase, 0, EGL_SUCCESS },
293 { EDrawContentCase, 0, EGL_SUCCESS },
294 { EContentUpdateCase, 0, EGL_SUCCESS },
295 { EBeginStreamingCase, 0, EGL_SUCCESS },
296 { EAcquireImageCase, 0, EGL_SUCCESS },
297 { EAcquireImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
298 { EAcquireImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
299 { EAcquireImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
300 { ECompareImageCase, 0, EGL_SUCCESS },
301 { EReleaseImageCase, 0, EGL_SUCCESS },
302 { EDestroyEndpointCase, 0, EGL_SUCCESS },
303 { ETerminateCase, 0, EGL_SUCCESS },
310 static const TTestCase KReleaseBadParamCases[] =
314 CASETITLE("Functional: Negative: eglReleaseImageNOK with Bad Parameters: Various bad Parameters(Not Ready state)"),
315 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
317 { EInitializeCase, 0, EGL_SUCCESS },
318 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
319 { ECreateEndpointCase, 0, EGL_SUCCESS },
320 { EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
321 { EReleaseImageCase, EUseBadEglImage | EUseBadDisplay, EGL_BAD_DISPLAY },
322 { EReleaseImageCase, EUseBadEglImage | EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
323 { EDestroyEndpointCase, 0, EGL_SUCCESS },
324 { ETerminateCase, 0, EGL_SUCCESS },
330 CASETITLE("Functional: Negative: eglReleaseImageNOK with Bad Parameters: Various bad Parameters(Ready state)"),
331 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
333 { EInitializeCase, 0, EGL_SUCCESS },
334 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
335 { ECreateEndpointCase, 0, EGL_SUCCESS },
336 { EDrawContentCase, 0, EGL_SUCCESS },
337 { EContentUpdateCase, 0, EGL_SUCCESS },
338 { EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
339 { EReleaseImageCase, EUseBadEglImage | EUseBadDisplay, EGL_BAD_DISPLAY },
340 { EReleaseImageCase, EUseBadEglImage | EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
341 { EDestroyEndpointCase, 0, EGL_SUCCESS },
342 { ETerminateCase, 0, EGL_SUCCESS },
348 CASETITLE("Functional: Negative: eglReleaseImageNOK with Bad Parameters: Bad Parameters(Streaming state)"),
349 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
351 { EInitializeCase, 0, EGL_SUCCESS },
352 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
353 { ECreateEndpointCase, 0, EGL_SUCCESS },
354 { EDrawContentCase, 0, EGL_SUCCESS },
355 { EContentUpdateCase, 0, EGL_SUCCESS },
356 { EBeginStreamingCase, 0, EGL_SUCCESS },
357 { EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
358 { EReleaseImageCase, EUseBadEglImage | EUseBadDisplay, EGL_BAD_DISPLAY },
359 { EReleaseImageCase, EUseBadEglImage | EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
360 { EDestroyEndpointCase, 0, EGL_SUCCESS },
361 { ETerminateCase, 0, EGL_SUCCESS },
367 CASETITLE("Functional: Negative: eglReleaseImageNOK with Bad Parameters: Various bad Parameters(Image Acquired state)"),
368 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
370 { EInitializeCase, 0, EGL_SUCCESS },
371 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
372 { ECreateEndpointCase, 0, EGL_SUCCESS },
373 { EDrawContentCase, 0, EGL_SUCCESS },
374 { EContentUpdateCase, 0, EGL_SUCCESS },
375 { EBeginStreamingCase, 0, EGL_SUCCESS },
376 { EAcquireImageCase, 0, EGL_SUCCESS },
377 { EReleaseImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
378 { EReleaseImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
379 { EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
380 { EReleaseImageCase, EUseBadApi, EGL_BAD_PARAMETER },
381 { EReleaseImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
382 { EReleaseImageCase, EUseBadDisplay | EUseBadEglImage, EGL_BAD_DISPLAY },
383 { EReleaseImageCase, EUseBadDisplay | EUseBadApi, EGL_BAD_DISPLAY },
384 { EReleaseImageCase, EUseBadEglImage | EUseBadApi, EGL_BAD_PARAMETER },
385 { EReleaseImageCase, EUseBadDisplay | EUseBadEndpoint | EUseBadEglImage, EGL_BAD_DISPLAY },
386 { EReleaseImageCase, EUseBadDisplay | EUseBadEndpoint | EUseBadApi, EGL_BAD_DISPLAY },
387 { EReleaseImageCase, EUseBadDisplay | EUseBadEglImage | EUseBadApi, EGL_BAD_DISPLAY },
388 { EReleaseImageCase, EUseBadDisplay | EUseBadEndpoint | EUseBadEglImage | EUseBadApi, EGL_BAD_DISPLAY },
389 { ECompareImageCase, 0, EGL_SUCCESS },
390 { EReleaseImageCase, 0, EGL_SUCCESS },
391 { EDestroyEndpointCase, 0, EGL_SUCCESS },
392 { ETerminateCase, 0, EGL_SUCCESS },
399 static const TTestCase KReleasePositiveCases[] =
403 CASETITLE("Functional: Positive: eglReleaseImageNOK with Valid Parameters: Simple acquire then release"),
404 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
406 { EInitializeCase, 0, EGL_SUCCESS },
407 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
408 { ECreateEndpointCase, 0, EGL_SUCCESS },
409 { EDrawContentCase, 0, EGL_SUCCESS },
410 { EContentUpdateCase, 0, EGL_SUCCESS },
411 { EBeginStreamingCase, 0, EGL_SUCCESS },
412 { EAcquireImageCase, 0, EGL_SUCCESS },
413 { ECompareImageCase, 0, EGL_SUCCESS },
414 { EReleaseImageCase, 0, EGL_SUCCESS },
415 { EDestroyEndpointCase, 0, EGL_SUCCESS },
416 { ETerminateCase, 0, EGL_SUCCESS },
422 CASETITLE("Functional: Positive: eglReleaseImageNOK with Valid Parameters: Acquire, release twice"),
423 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
425 { EInitializeCase, 0, EGL_SUCCESS },
426 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
427 { ECreateEndpointCase, 0, EGL_SUCCESS },
428 { EDrawContentCase, 0, EGL_SUCCESS },
429 { EContentUpdateCase, 0, EGL_SUCCESS },
430 { EBeginStreamingCase, 0, EGL_SUCCESS },
431 { EAcquireImageCase, 0, EGL_SUCCESS },
432 { ECompareImageCase, 0, EGL_SUCCESS },
433 { EReleaseImageCase, 0, EGL_SUCCESS },
435 { EReleaseImageCase, EExpectError, EGL_BAD_PARAMETER },
436 { EDestroyEndpointCase, 0, EGL_SUCCESS },
437 { ETerminateCase, 0, EGL_SUCCESS },
443 static const TTestCase KReleaseNegativeCases[] =
447 CASETITLE("Functional: Negative: eglReleaseImageNOK with Valid Parameters: Two EPs, acquire, then release on wrong EP."),
448 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
450 { EInitializeCase, 0, EGL_SUCCESS },
451 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
452 { ECreateSurfaceCase, 0, EGL_SUCCESS, 1, EStandardSurface },
453 { ECreateEndpointCase, 0, EGL_SUCCESS, 0, 0 },
454 { ECreateEndpointCase, 0, EGL_SUCCESS, 1, 1 },
455 { EDrawContentCase, 0, EGL_SUCCESS, 0, 0 },
456 { EContentUpdateCase, 0, EGL_SUCCESS, 0 },
457 { EDrawContentCase, 0, EGL_SUCCESS, 1, 1 },
458 { EContentUpdateCase, 0, EGL_SUCCESS, 1 },
459 { EBeginStreamingCase, 0, EGL_SUCCESS, 0 },
460 { EBeginStreamingCase, 0, EGL_SUCCESS, 1 },
461 { EAcquireImageCase, 0, EGL_SUCCESS, 0, 0 },
462 { EAcquireImageCase, 0, EGL_SUCCESS, 1, 1 },
463 // Swapping the release of the image - should fail.
464 { EReleaseImageCase, EExpectError, EGL_BAD_PARAMETER, 0, 1 },
465 { EReleaseImageCase, EExpectError, EGL_BAD_PARAMETER, 1, 0 },
466 // Check that the originally acquired images are still there...
467 { ECompareImageCase, 0, EGL_SUCCESS, 0, 0 },
468 { ECompareImageCase, 0, EGL_SUCCESS, 1, 1 },
469 // Now do it the right way around
470 { EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 },
471 { EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 },
472 { EDestroyEndpointCase, 0, EGL_SUCCESS, 0 },
473 { EDestroyEndpointCase, 0, EGL_SUCCESS, 1 },
474 { ETerminateCase, 0, EGL_SUCCESS },
480 CASETITLE("Functional: Negative: eglDestroyImageKHR can not be used for images acquired from endpoint."),
481 SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
483 { EInitializeCase, 0, EGL_SUCCESS },
484 { ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
485 { ECreateEndpointCase, 0, EGL_SUCCESS, },
486 { EDrawContentCase, 0, EGL_SUCCESS, },
487 { EContentUpdateCase, 0, EGL_SUCCESS, },
488 { EBeginStreamingCase, 0, EGL_SUCCESS, },
489 { EAcquireImageCase, 0, EGL_SUCCESS, },
490 { EDestroyEglImageCase, EExpectError, EGL_BAD_ACCESS },
491 // Compare Image to make sure it's still "there".
492 { ECompareImageCase, 0, EGL_SUCCESS, },
493 { EReleaseImageCase, 0, EGL_SUCCESS, },
494 { EDestroyEndpointCase, 0, EGL_SUCCESS, },
495 { ETerminateCase, 0, EGL_SUCCESS },
503 static const TTestCases KTestCases[] =
505 TestCase(KAcquirePositiveCases),
506 TestCase(KAcquireNegativeCases),
507 TestCase(KAcquireBadParamCases),
508 TestCase(KReleasePositiveCases),
509 TestCase(KReleaseBadParamCases),
510 TestCase(KReleaseNegativeCases),
513 const TInt KNumberTestCases = sizeof(KTestCases) / sizeof(KTestCases[0]);
516 CEglTest_LocalTestStep_EndpointAcquire::CEglTest_LocalTestStep_EndpointAcquire():
517 CEgltest_Local_Engine(KTestCases, KNumberTestCases)