1 //
2 // Copyright 2023 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // egl_context_lock_autogen.h:
7 // Context Lock functions for the EGL entry points.
8
9 #ifndef LIBGLESV2_EGL_CONTEXT_LOCK_IMPL_H_
10 #define LIBGLESV2_EGL_CONTEXT_LOCK_IMPL_H_
11
12 #include "libGLESv2/egl_context_lock_autogen.h"
13
14 namespace egl
15 {
16
GetContextLock_ChooseConfig(Thread * thread,egl::Display * dpyPacked)17 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ChooseConfig(Thread *thread,
18 egl::Display *dpyPacked)
19 {
20 return {};
21 }
22
GetContextLock_CopyBuffers(Thread * thread,egl::Display * dpyPacked)23 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CopyBuffers(Thread *thread,
24 egl::Display *dpyPacked)
25 {
26 return {};
27 }
28
GetContextLock_CreateContext(Thread * thread,egl::Display * dpyPacked,gl::ContextID share_contextPacked)29 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateContext(Thread *thread,
30 egl::Display *dpyPacked,
31 gl::ContextID share_contextPacked)
32 {
33 return TryLockAndActivateSharedContextMutex(dpyPacked, share_contextPacked);
34 }
35
GetContextLock_CreatePbufferSurface(Thread * thread,egl::Display * dpyPacked)36 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreatePbufferSurface(Thread *thread,
37 egl::Display *dpyPacked)
38 {
39 return {};
40 }
41
GetContextLock_CreatePixmapSurface(Thread * thread,egl::Display * dpyPacked)42 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreatePixmapSurface(Thread *thread,
43 egl::Display *dpyPacked)
44 {
45 return {};
46 }
47
GetContextLock_CreateWindowSurface(Thread * thread,egl::Display * dpyPacked)48 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateWindowSurface(Thread *thread,
49 egl::Display *dpyPacked)
50 {
51 return {};
52 }
53
GetContextLock_DestroyContext(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)54 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroyContext(Thread *thread,
55 egl::Display *dpyPacked,
56 gl::ContextID ctxPacked)
57 {
58 // Explicit lock in egl::Display::destroyContext()/makeCurrent()
59 return {};
60 }
61
GetContextLock_DestroySurface(Thread * thread,egl::Display * dpyPacked)62 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroySurface(Thread *thread,
63 egl::Display *dpyPacked)
64 {
65 return {};
66 }
67
GetContextLock_GetConfigAttrib(Thread * thread,egl::Display * dpyPacked,EGLint attribute)68 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetConfigAttrib(Thread *thread,
69 egl::Display *dpyPacked,
70 EGLint attribute)
71 {
72 return {};
73 }
74
GetContextLock_GetConfigs(Thread * thread,egl::Display * dpyPacked)75 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetConfigs(Thread *thread,
76 egl::Display *dpyPacked)
77 {
78 return {};
79 }
80
GetContextLock_GetCurrentDisplay(Thread * thread)81 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetCurrentDisplay(Thread *thread)
82 {
83 return {};
84 }
85
GetContextLock_GetCurrentSurface(Thread * thread)86 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetCurrentSurface(Thread *thread)
87 {
88 return {};
89 }
90
GetContextLock_GetDisplay(Thread * thread)91 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetDisplay(Thread *thread)
92 {
93 return {};
94 }
95
GetContextLock_GetError(Thread * thread)96 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetError(Thread *thread)
97 {
98 return {};
99 }
100
GetContextLock_GetProcAddress(Thread * thread)101 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetProcAddress(Thread *thread)
102 {
103 return {};
104 }
105
GetContextLock_Initialize(Thread * thread,egl::Display * dpyPacked)106 ANGLE_INLINE ScopedContextMutexLock GetContextLock_Initialize(Thread *thread,
107 egl::Display *dpyPacked)
108 {
109 return {};
110 }
111
GetContextLock_MakeCurrent(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)112 ANGLE_INLINE ScopedContextMutexLock GetContextLock_MakeCurrent(Thread *thread,
113 egl::Display *dpyPacked,
114 gl::ContextID ctxPacked)
115 {
116 // Explicit lock in egl::Display::makeCurrent()
117 return {};
118 }
119
GetContextLock_QueryContext(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked,EGLint attribute)120 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryContext(Thread *thread,
121 egl::Display *dpyPacked,
122 gl::ContextID ctxPacked,
123 EGLint attribute)
124 {
125 // Don't lock mutex for all atributes to avoid activating SharedContextMutex when not required.
126 switch (attribute)
127 {
128 // Dynamic state.
129 case EGL_RENDER_BUFFER:
130 return TryLockContextForThread(thread, dpyPacked, ctxPacked);
131 // Rest states are static.
132 default:
133 return {};
134 }
135 }
136
GetContextLock_QueryString(Thread * thread,egl::Display * dpyPacked)137 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryString(Thread *thread,
138 egl::Display *dpyPacked)
139 {
140 return {};
141 }
142
GetContextLock_QuerySurface(Thread * thread,egl::Display * dpyPacked,EGLint attribute)143 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QuerySurface(Thread *thread,
144 egl::Display *dpyPacked,
145 EGLint attribute)
146 {
147 switch (attribute)
148 {
149 // EGL_BUFFER_AGE_EXT uses current Context and therefore requires the lock.
150 case EGL_BUFFER_AGE_EXT:
151 return TryLockCurrentContext(thread);
152 // Other attributes are not using Context, therefore lock is not required.
153 default:
154 return {};
155 }
156 }
157
GetContextLock_SwapBuffers(Thread * thread,egl::Display * dpyPacked)158 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SwapBuffers(Thread *thread,
159 egl::Display *dpyPacked)
160 {
161 return TryLockCurrentContext(thread);
162 }
163
GetContextLock_Terminate(Thread * thread,egl::Display * dpyPacked)164 ANGLE_INLINE ScopedContextMutexLock GetContextLock_Terminate(Thread *thread,
165 egl::Display *dpyPacked)
166 {
167 // Accesses only not curent Contexts or when TerminateReason::NoActiveThreads
168 return {};
169 }
170
GetContextLock_WaitGL(Thread * thread)171 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitGL(Thread *thread)
172 {
173 return TryLockCurrentContext(thread);
174 }
175
GetContextLock_WaitNative(Thread * thread)176 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitNative(Thread *thread)
177 {
178 return TryLockCurrentContext(thread);
179 }
180
181 // EGL 1.1
GetContextLock_BindTexImage(Thread * thread,egl::Display * dpyPacked)182 ANGLE_INLINE ScopedContextMutexLock GetContextLock_BindTexImage(Thread *thread,
183 egl::Display *dpyPacked)
184 {
185 return TryLockCurrentContext(thread);
186 }
187
GetContextLock_ReleaseTexImage(Thread * thread,egl::Display * dpyPacked)188 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ReleaseTexImage(Thread *thread,
189 egl::Display *dpyPacked)
190 {
191 return TryLockCurrentContext(thread);
192 }
193
GetContextLock_SurfaceAttrib(Thread * thread,egl::Display * dpyPacked,EGLint attribute)194 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SurfaceAttrib(Thread *thread,
195 egl::Display *dpyPacked,
196 EGLint attribute)
197 {
198 return {};
199 }
200
GetContextLock_SwapInterval(Thread * thread,egl::Display * dpyPacked)201 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SwapInterval(Thread *thread,
202 egl::Display *dpyPacked)
203 {
204 // Only checked in Validation that we have current Context
205 return {};
206 }
207
208 // EGL 1.2
GetContextLock_BindAPI(Thread * thread)209 ANGLE_INLINE ScopedContextMutexLock GetContextLock_BindAPI(Thread *thread)
210 {
211 return {};
212 }
213
214 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePbufferFromClientBuffer(Thread * thread,egl::Display * dpyPacked)215 GetContextLock_CreatePbufferFromClientBuffer(Thread *thread, egl::Display *dpyPacked)
216 {
217 return {};
218 }
219
GetContextLock_QueryAPI(Thread * thread)220 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryAPI(Thread *thread)
221 {
222 return {};
223 }
224
GetContextLock_ReleaseThread(Thread * thread)225 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ReleaseThread(Thread *thread)
226 {
227 // Explicit lock in egl::Display::makeCurrent()
228 return {};
229 }
230
GetContextLock_WaitClient(Thread * thread)231 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitClient(Thread *thread)
232 {
233 return TryLockCurrentContext(thread);
234 }
235
236 // EGL 1.4
GetContextLock_GetCurrentContext(Thread * thread)237 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetCurrentContext(Thread *thread)
238 {
239 return {};
240 }
241
242 // EGL 1.5
GetContextLock_ClientWaitSync(Thread * thread,egl::Display * dpyPacked)243 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ClientWaitSync(Thread *thread,
244 egl::Display *dpyPacked)
245 {
246 return TryLockCurrentContext(thread);
247 }
248
GetContextLock_CreateImage(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)249 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateImage(Thread *thread,
250 egl::Display *dpyPacked,
251 gl::ContextID ctxPacked)
252 {
253 return TryLockAndActivateSharedContextMutex(dpyPacked, ctxPacked);
254 }
255
256 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePlatformPixmapSurface(Thread * thread,egl::Display * dpyPacked)257 GetContextLock_CreatePlatformPixmapSurface(Thread *thread, egl::Display *dpyPacked)
258 {
259 return {};
260 }
261
262 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePlatformWindowSurface(Thread * thread,egl::Display * dpyPacked)263 GetContextLock_CreatePlatformWindowSurface(Thread *thread, egl::Display *dpyPacked)
264 {
265 return {};
266 }
267
GetContextLock_CreateSync(Thread * thread,egl::Display * dpyPacked)268 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateSync(Thread *thread,
269 egl::Display *dpyPacked)
270 {
271 return TryLockCurrentContext(thread);
272 }
273
GetContextLock_DestroyImage(Thread * thread,egl::Display * dpyPacked)274 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroyImage(Thread *thread,
275 egl::Display *dpyPacked)
276 {
277 // Explicit lock in egl::Display::destroyImageImpl()
278 return {};
279 }
280
GetContextLock_DestroySync(Thread * thread,egl::Display * dpyPacked)281 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroySync(Thread *thread,
282 egl::Display *dpyPacked)
283 {
284 return {};
285 }
286
GetContextLock_GetPlatformDisplay(Thread * thread)287 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetPlatformDisplay(Thread *thread)
288 {
289 return {};
290 }
291
GetContextLock_GetSyncAttrib(Thread * thread,egl::Display * dpyPacked,EGLint attribute)292 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetSyncAttrib(Thread *thread,
293 egl::Display *dpyPacked,
294 EGLint attribute)
295 {
296 return {};
297 }
298
GetContextLock_WaitSync(Thread * thread,egl::Display * dpyPacked)299 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitSync(Thread *thread, egl::Display *dpyPacked)
300 {
301 return TryLockCurrentContext(thread);
302 }
303
304 // EGL_ANDROID_blob_cache
GetContextLock_SetBlobCacheFuncsANDROID(Thread * thread,egl::Display * dpyPacked)305 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SetBlobCacheFuncsANDROID(Thread *thread,
306 egl::Display *dpyPacked)
307 {
308 return {};
309 }
310
311 // EGL_ANDROID_create_native_client_buffer
GetContextLock_CreateNativeClientBufferANDROID(Thread * thread)312 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateNativeClientBufferANDROID(Thread *thread)
313 {
314 return {};
315 }
316
317 // EGL_ANDROID_get_frame_timestamps
318 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_GetCompositorTimingSupportedANDROID(Thread * thread,egl::Display * dpyPacked)319 GetContextLock_GetCompositorTimingSupportedANDROID(Thread *thread, egl::Display *dpyPacked)
320 {
321 return {};
322 }
323
324 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_GetCompositorTimingANDROID(Thread * thread,egl::Display * dpyPacked)325 GetContextLock_GetCompositorTimingANDROID(Thread *thread, egl::Display *dpyPacked)
326 {
327 return {};
328 }
329
GetContextLock_GetNextFrameIdANDROID(Thread * thread,egl::Display * dpyPacked)330 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetNextFrameIdANDROID(Thread *thread,
331 egl::Display *dpyPacked)
332 {
333 return {};
334 }
335
336 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_GetFrameTimestampSupportedANDROID(Thread * thread,egl::Display * dpyPacked)337 GetContextLock_GetFrameTimestampSupportedANDROID(Thread *thread, egl::Display *dpyPacked)
338 {
339 return {};
340 }
341
342 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_GetFrameTimestampsANDROID(Thread * thread,egl::Display * dpyPacked)343 GetContextLock_GetFrameTimestampsANDROID(Thread *thread, egl::Display *dpyPacked)
344 {
345 return {};
346 }
347
348 // EGL_ANDROID_get_native_client_buffer
GetContextLock_GetNativeClientBufferANDROID(Thread * thread)349 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetNativeClientBufferANDROID(Thread *thread)
350 {
351 return {};
352 }
353
354 // EGL_ANDROID_native_fence_sync
GetContextLock_DupNativeFenceFDANDROID(Thread * thread,egl::Display * dpyPacked)355 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DupNativeFenceFDANDROID(Thread *thread,
356 egl::Display *dpyPacked)
357 {
358 return {};
359 }
360
361 // EGL_ANDROID_presentation_time
GetContextLock_PresentationTimeANDROID(Thread * thread,egl::Display * dpyPacked)362 ANGLE_INLINE ScopedContextMutexLock GetContextLock_PresentationTimeANDROID(Thread *thread,
363 egl::Display *dpyPacked)
364 {
365 return {};
366 }
367
368 // EGL_ANGLE_device_creation
GetContextLock_CreateDeviceANGLE(Thread * thread)369 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateDeviceANGLE(Thread *thread)
370 {
371 return {};
372 }
373
GetContextLock_ReleaseDeviceANGLE(Thread * thread)374 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ReleaseDeviceANGLE(Thread *thread)
375 {
376 return {};
377 }
378
379 // EGL_ANGLE_external_context_and_surface
380 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_AcquireExternalContextANGLE(Thread * thread,egl::Display * dpyPacked)381 GetContextLock_AcquireExternalContextANGLE(Thread *thread, egl::Display *dpyPacked)
382 {
383 return TryLockCurrentContext(thread);
384 }
385
386 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_ReleaseExternalContextANGLE(Thread * thread,egl::Display * dpyPacked)387 GetContextLock_ReleaseExternalContextANGLE(Thread *thread, egl::Display *dpyPacked)
388 {
389 return TryLockCurrentContext(thread);
390 }
391
392 // EGL_ANGLE_feature_control
GetContextLock_QueryStringiANGLE(Thread * thread,egl::Display * dpyPacked)393 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryStringiANGLE(Thread *thread,
394 egl::Display *dpyPacked)
395 {
396 return {};
397 }
398
GetContextLock_QueryDisplayAttribANGLE(Thread * thread,egl::Display * dpyPacked,EGLint attribute)399 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDisplayAttribANGLE(Thread *thread,
400 egl::Display *dpyPacked,
401 EGLint attribute)
402 {
403 return {};
404 }
405
406 // EGL_ANGLE_metal_shared_event_sync
407 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CopyMetalSharedEventANGLE(Thread * thread,egl::Display * dpyPacked)408 GetContextLock_CopyMetalSharedEventANGLE(Thread *thread, egl::Display *dpyPacked)
409 {
410 return {};
411 }
412
413 // EGL_ANGLE_power_preference
GetContextLock_ReleaseHighPowerGPUANGLE(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)414 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ReleaseHighPowerGPUANGLE(Thread *thread,
415 egl::Display *dpyPacked,
416 gl::ContextID ctxPacked)
417 {
418 return TryLockContextForThread(thread, dpyPacked, ctxPacked);
419 }
420
421 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_ReacquireHighPowerGPUANGLE(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)422 GetContextLock_ReacquireHighPowerGPUANGLE(Thread *thread,
423 egl::Display *dpyPacked,
424 gl::ContextID ctxPacked)
425 {
426 return TryLockContextForThread(thread, dpyPacked, ctxPacked);
427 }
428
GetContextLock_HandleGPUSwitchANGLE(Thread * thread,egl::Display * dpyPacked)429 ANGLE_INLINE ScopedContextMutexLock GetContextLock_HandleGPUSwitchANGLE(Thread *thread,
430 egl::Display *dpyPacked)
431 {
432 return {};
433 }
434
GetContextLock_ForceGPUSwitchANGLE(Thread * thread,egl::Display * dpyPacked)435 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ForceGPUSwitchANGLE(Thread *thread,
436 egl::Display *dpyPacked)
437 {
438 return {};
439 }
440
441 // EGL_ANGLE_prepare_swap_buffers
GetContextLock_PrepareSwapBuffersANGLE(Thread * thread,egl::Display * dpyPacked)442 ANGLE_INLINE ScopedContextMutexLock GetContextLock_PrepareSwapBuffersANGLE(Thread *thread,
443 egl::Display *dpyPacked)
444 {
445 return TryLockCurrentContext(thread);
446 }
447
448 // EGL_ANGLE_program_cache_control
449 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_ProgramCacheGetAttribANGLE(Thread * thread,egl::Display * dpyPacked)450 GetContextLock_ProgramCacheGetAttribANGLE(Thread *thread, egl::Display *dpyPacked)
451 {
452 return {};
453 }
454
GetContextLock_ProgramCacheQueryANGLE(Thread * thread,egl::Display * dpyPacked)455 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ProgramCacheQueryANGLE(Thread *thread,
456 egl::Display *dpyPacked)
457 {
458 return {};
459 }
460
461 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_ProgramCachePopulateANGLE(Thread * thread,egl::Display * dpyPacked)462 GetContextLock_ProgramCachePopulateANGLE(Thread *thread, egl::Display *dpyPacked)
463 {
464 return {};
465 }
466
GetContextLock_ProgramCacheResizeANGLE(Thread * thread,egl::Display * dpyPacked)467 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ProgramCacheResizeANGLE(Thread *thread,
468 egl::Display *dpyPacked)
469 {
470 return {};
471 }
472
473 // EGL_ANGLE_query_surface_pointer
GetContextLock_QuerySurfacePointerANGLE(Thread * thread,egl::Display * dpyPacked,EGLint attribute)474 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QuerySurfacePointerANGLE(Thread *thread,
475 egl::Display *dpyPacked,
476 EGLint attribute)
477 {
478 return {};
479 }
480
481 // EGL_ANGLE_stream_producer_d3d_texture
482 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreateStreamProducerD3DTextureANGLE(Thread * thread,egl::Display * dpyPacked)483 GetContextLock_CreateStreamProducerD3DTextureANGLE(Thread *thread, egl::Display *dpyPacked)
484 {
485 return {};
486 }
487
488 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_StreamPostD3DTextureANGLE(Thread * thread,egl::Display * dpyPacked)489 GetContextLock_StreamPostD3DTextureANGLE(Thread *thread, egl::Display *dpyPacked)
490 {
491 return {};
492 }
493
494 // EGL_ANGLE_swap_with_frame_token
495 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_SwapBuffersWithFrameTokenANGLE(Thread * thread,egl::Display * dpyPacked)496 GetContextLock_SwapBuffersWithFrameTokenANGLE(Thread *thread, egl::Display *dpyPacked)
497 {
498 return TryLockCurrentContext(thread);
499 }
500
501 // EGL_ANGLE_sync_control_rate
GetContextLock_GetMscRateANGLE(Thread * thread,egl::Display * dpyPacked)502 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetMscRateANGLE(Thread *thread,
503 egl::Display *dpyPacked)
504 {
505 return {};
506 }
507
508 // EGL_ANGLE_vulkan_image
GetContextLock_ExportVkImageANGLE(Thread * thread,egl::Display * dpyPacked)509 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ExportVkImageANGLE(Thread *thread,
510 egl::Display *dpyPacked)
511 {
512 return {};
513 }
514
515 // EGL_ANGLE_wait_until_work_scheduled
516 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_WaitUntilWorkScheduledANGLE(Thread * thread,egl::Display * dpyPacked)517 GetContextLock_WaitUntilWorkScheduledANGLE(Thread *thread, egl::Display *dpyPacked)
518 {
519 return {};
520 }
521
522 // EGL_CHROMIUM_sync_control
GetContextLock_GetSyncValuesCHROMIUM(Thread * thread,egl::Display * dpyPacked)523 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetSyncValuesCHROMIUM(Thread *thread,
524 egl::Display *dpyPacked)
525 {
526 return {};
527 }
528
529 // EGL_EXT_device_query
GetContextLock_QueryDeviceAttribEXT(Thread * thread,EGLint attribute)530 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDeviceAttribEXT(Thread *thread,
531 EGLint attribute)
532 {
533 return {};
534 }
535
GetContextLock_QueryDeviceStringEXT(Thread * thread)536 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDeviceStringEXT(Thread *thread)
537 {
538 return {};
539 }
540
GetContextLock_QueryDisplayAttribEXT(Thread * thread,egl::Display * dpyPacked,EGLint attribute)541 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDisplayAttribEXT(Thread *thread,
542 egl::Display *dpyPacked,
543 EGLint attribute)
544 {
545 return {};
546 }
547
548 // EGL_EXT_image_dma_buf_import_modifiers
GetContextLock_QueryDmaBufFormatsEXT(Thread * thread,egl::Display * dpyPacked)549 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDmaBufFormatsEXT(Thread *thread,
550 egl::Display *dpyPacked)
551 {
552 return {};
553 }
554
GetContextLock_QueryDmaBufModifiersEXT(Thread * thread,egl::Display * dpyPacked)555 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDmaBufModifiersEXT(Thread *thread,
556 egl::Display *dpyPacked)
557 {
558 return {};
559 }
560
561 // EGL_EXT_platform_base
562 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePlatformPixmapSurfaceEXT(Thread * thread,egl::Display * dpyPacked)563 GetContextLock_CreatePlatformPixmapSurfaceEXT(Thread *thread, egl::Display *dpyPacked)
564 {
565 return {};
566 }
567
568 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePlatformWindowSurfaceEXT(Thread * thread,egl::Display * dpyPacked)569 GetContextLock_CreatePlatformWindowSurfaceEXT(Thread *thread, egl::Display *dpyPacked)
570 {
571 return {};
572 }
573
GetContextLock_GetPlatformDisplayEXT(Thread * thread)574 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetPlatformDisplayEXT(Thread *thread)
575 {
576 return {};
577 }
578
579 // EGL_KHR_debug
GetContextLock_DebugMessageControlKHR(Thread * thread)580 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DebugMessageControlKHR(Thread *thread)
581 {
582 return {};
583 }
584
GetContextLock_LabelObjectKHR(Thread * thread,egl::Display * dpyPacked)585 ANGLE_INLINE ScopedContextMutexLock GetContextLock_LabelObjectKHR(Thread *thread,
586 egl::Display *dpyPacked)
587 {
588 return {};
589 }
590
GetContextLock_QueryDebugKHR(Thread * thread,EGLint attribute)591 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDebugKHR(Thread *thread, EGLint attribute)
592 {
593 return {};
594 }
595
596 // EGL_KHR_fence_sync
GetContextLock_ClientWaitSyncKHR(Thread * thread,egl::Display * dpyPacked)597 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ClientWaitSyncKHR(Thread *thread,
598 egl::Display *dpyPacked)
599 {
600 return TryLockCurrentContext(thread);
601 }
602
GetContextLock_CreateSyncKHR(Thread * thread,egl::Display * dpyPacked)603 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateSyncKHR(Thread *thread,
604 egl::Display *dpyPacked)
605 {
606 return TryLockCurrentContext(thread);
607 }
608
GetContextLock_DestroySyncKHR(Thread * thread,egl::Display * dpyPacked)609 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroySyncKHR(Thread *thread,
610 egl::Display *dpyPacked)
611 {
612 return {};
613 }
614
GetContextLock_GetSyncAttribKHR(Thread * thread,egl::Display * dpyPacked,EGLint attribute)615 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetSyncAttribKHR(Thread *thread,
616 egl::Display *dpyPacked,
617 EGLint attribute)
618 {
619 return {};
620 }
621
622 // EGL_KHR_image
GetContextLock_CreateImageKHR(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)623 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateImageKHR(Thread *thread,
624 egl::Display *dpyPacked,
625 gl::ContextID ctxPacked)
626 {
627 return TryLockAndActivateSharedContextMutex(dpyPacked, ctxPacked);
628 }
629
GetContextLock_DestroyImageKHR(Thread * thread,egl::Display * dpyPacked)630 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroyImageKHR(Thread *thread,
631 egl::Display *dpyPacked)
632 {
633 // Explicit lock in egl::Display::destroyImageImpl()
634 return {};
635 }
636
637 // EGL_KHR_lock_surface3
GetContextLock_LockSurfaceKHR(Thread * thread,egl::Display * dpyPacked)638 ANGLE_INLINE ScopedContextMutexLock GetContextLock_LockSurfaceKHR(Thread *thread,
639 egl::Display *dpyPacked)
640 {
641 return {};
642 }
643
GetContextLock_QuerySurface64KHR(Thread * thread,egl::Display * dpyPacked,EGLint attribute)644 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QuerySurface64KHR(Thread *thread,
645 egl::Display *dpyPacked,
646 EGLint attribute)
647 {
648 return {};
649 }
650
GetContextLock_UnlockSurfaceKHR(Thread * thread,egl::Display * dpyPacked)651 ANGLE_INLINE ScopedContextMutexLock GetContextLock_UnlockSurfaceKHR(Thread *thread,
652 egl::Display *dpyPacked)
653 {
654 return {};
655 }
656
657 // EGL_KHR_partial_update
GetContextLock_SetDamageRegionKHR(Thread * thread,egl::Display * dpyPacked)658 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SetDamageRegionKHR(Thread *thread,
659 egl::Display *dpyPacked)
660 {
661 return {};
662 }
663
664 // EGL_KHR_reusable_sync
GetContextLock_SignalSyncKHR(Thread * thread,egl::Display * dpyPacked)665 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SignalSyncKHR(Thread *thread,
666 egl::Display *dpyPacked)
667 {
668 return TryLockCurrentContext(thread);
669 }
670
671 // EGL_KHR_stream
GetContextLock_CreateStreamKHR(Thread * thread,egl::Display * dpyPacked)672 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateStreamKHR(Thread *thread,
673 egl::Display *dpyPacked)
674 {
675 return {};
676 }
677
GetContextLock_DestroyStreamKHR(Thread * thread,egl::Display * dpyPacked)678 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroyStreamKHR(Thread *thread,
679 egl::Display *dpyPacked)
680 {
681 return {};
682 }
683
GetContextLock_QueryStreamKHR(Thread * thread,egl::Display * dpyPacked,EGLenum attribute)684 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryStreamKHR(Thread *thread,
685 egl::Display *dpyPacked,
686 EGLenum attribute)
687 {
688 return {};
689 }
690
GetContextLock_QueryStreamu64KHR(Thread * thread,egl::Display * dpyPacked,EGLenum attribute)691 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryStreamu64KHR(Thread *thread,
692 egl::Display *dpyPacked,
693 EGLenum attribute)
694 {
695 return {};
696 }
697
GetContextLock_StreamAttribKHR(Thread * thread,egl::Display * dpyPacked,EGLenum attribute)698 ANGLE_INLINE ScopedContextMutexLock GetContextLock_StreamAttribKHR(Thread *thread,
699 egl::Display *dpyPacked,
700 EGLenum attribute)
701 {
702 return {};
703 }
704
705 // EGL_KHR_stream_consumer_gltexture
GetContextLock_StreamConsumerAcquireKHR(Thread * thread,egl::Display * dpyPacked)706 ANGLE_INLINE ScopedContextMutexLock GetContextLock_StreamConsumerAcquireKHR(Thread *thread,
707 egl::Display *dpyPacked)
708 {
709 return TryLockCurrentContext(thread);
710 }
711
712 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_StreamConsumerGLTextureExternalKHR(Thread * thread,egl::Display * dpyPacked)713 GetContextLock_StreamConsumerGLTextureExternalKHR(Thread *thread, egl::Display *dpyPacked)
714 {
715 return TryLockCurrentContext(thread);
716 }
717
GetContextLock_StreamConsumerReleaseKHR(Thread * thread,egl::Display * dpyPacked)718 ANGLE_INLINE ScopedContextMutexLock GetContextLock_StreamConsumerReleaseKHR(Thread *thread,
719 egl::Display *dpyPacked)
720 {
721 return TryLockCurrentContext(thread);
722 }
723
724 // EGL_KHR_swap_buffers_with_damage
GetContextLock_SwapBuffersWithDamageKHR(Thread * thread,egl::Display * dpyPacked)725 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SwapBuffersWithDamageKHR(Thread *thread,
726 egl::Display *dpyPacked)
727 {
728 return TryLockCurrentContext(thread);
729 }
730
731 // EGL_KHR_wait_sync
GetContextLock_WaitSyncKHR(Thread * thread,egl::Display * dpyPacked)732 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitSyncKHR(Thread *thread,
733 egl::Display *dpyPacked)
734 {
735 return TryLockCurrentContext(thread);
736 }
737
738 // EGL_NV_post_sub_buffer
GetContextLock_PostSubBufferNV(Thread * thread,egl::Display * dpyPacked)739 ANGLE_INLINE ScopedContextMutexLock GetContextLock_PostSubBufferNV(Thread *thread,
740 egl::Display *dpyPacked)
741 {
742 return TryLockCurrentContext(thread);
743 }
744
745 // EGL_NV_stream_consumer_gltexture_yuv
746 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_StreamConsumerGLTextureExternalAttribsNV(Thread * thread,egl::Display * dpyPacked)747 GetContextLock_StreamConsumerGLTextureExternalAttribsNV(Thread *thread, egl::Display *dpyPacked)
748 {
749 return TryLockCurrentContext(thread);
750 }
751
752 } // namespace egl
753
754 #endif // LIBGLESV2_EGL_CONTEXT_LOCK_IMPL_H_
755