• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 TryLockContext(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     return TryLockContext(dpyPacked, ctxPacked);
126 }
127 
GetContextLock_QueryString(Thread * thread,egl::Display * dpyPacked)128 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryString(Thread *thread,
129                                                                egl::Display *dpyPacked)
130 {
131     return {};
132 }
133 
GetContextLock_QuerySurface(Thread * thread,egl::Display * dpyPacked,EGLint attribute)134 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QuerySurface(Thread *thread,
135                                                                 egl::Display *dpyPacked,
136                                                                 EGLint attribute)
137 {
138     switch (attribute)
139     {
140         // EGL_BUFFER_AGE_EXT uses current Context and therefore requires the lock.
141         case EGL_BUFFER_AGE_EXT:
142             return TryLockCurrentContext(thread);
143         // Other attributes are not using Context, therefore lock is not required.
144         default:
145             return {};
146     }
147 }
148 
GetContextLock_SwapBuffers(Thread * thread,egl::Display * dpyPacked)149 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SwapBuffers(Thread *thread,
150                                                                egl::Display *dpyPacked)
151 {
152     return TryLockCurrentContext(thread);
153 }
154 
GetContextLock_Terminate(Thread * thread,egl::Display * dpyPacked)155 ANGLE_INLINE ScopedContextMutexLock GetContextLock_Terminate(Thread *thread,
156                                                              egl::Display *dpyPacked)
157 {
158     // Accesses only not curent Contexts
159     return {};
160 }
161 
GetContextLock_WaitGL(Thread * thread)162 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitGL(Thread *thread)
163 {
164     return TryLockCurrentContext(thread);
165 }
166 
GetContextLock_WaitNative(Thread * thread)167 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitNative(Thread *thread)
168 {
169     return TryLockCurrentContext(thread);
170 }
171 
172 // EGL 1.1
GetContextLock_BindTexImage(Thread * thread,egl::Display * dpyPacked)173 ANGLE_INLINE ScopedContextMutexLock GetContextLock_BindTexImage(Thread *thread,
174                                                                 egl::Display *dpyPacked)
175 {
176     return TryLockCurrentContext(thread);
177 }
178 
GetContextLock_ReleaseTexImage(Thread * thread,egl::Display * dpyPacked)179 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ReleaseTexImage(Thread *thread,
180                                                                    egl::Display *dpyPacked)
181 {
182     return TryLockCurrentContext(thread);
183 }
184 
GetContextLock_SurfaceAttrib(Thread * thread,egl::Display * dpyPacked,EGLint attribute)185 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SurfaceAttrib(Thread *thread,
186                                                                  egl::Display *dpyPacked,
187                                                                  EGLint attribute)
188 {
189     return {};
190 }
191 
GetContextLock_SwapInterval(Thread * thread,egl::Display * dpyPacked)192 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SwapInterval(Thread *thread,
193                                                                 egl::Display *dpyPacked)
194 {
195     // Only checked in Validation that we have current Context
196     return {};
197 }
198 
199 // EGL 1.2
GetContextLock_BindAPI(Thread * thread)200 ANGLE_INLINE ScopedContextMutexLock GetContextLock_BindAPI(Thread *thread)
201 {
202     return {};
203 }
204 
205 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePbufferFromClientBuffer(Thread * thread,egl::Display * dpyPacked)206 GetContextLock_CreatePbufferFromClientBuffer(Thread *thread, egl::Display *dpyPacked)
207 {
208     return {};
209 }
210 
GetContextLock_QueryAPI(Thread * thread)211 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryAPI(Thread *thread)
212 {
213     return {};
214 }
215 
GetContextLock_ReleaseThread(Thread * thread)216 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ReleaseThread(Thread *thread)
217 {
218     // Explicit lock in egl::Display::makeCurrent()
219     return {};
220 }
221 
GetContextLock_WaitClient(Thread * thread)222 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitClient(Thread *thread)
223 {
224     return TryLockCurrentContext(thread);
225 }
226 
227 // EGL 1.4
GetContextLock_GetCurrentContext(Thread * thread)228 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetCurrentContext(Thread *thread)
229 {
230     return {};
231 }
232 
233 // EGL 1.5
GetContextLock_ClientWaitSync(Thread * thread,egl::Display * dpyPacked)234 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ClientWaitSync(Thread *thread,
235                                                                   egl::Display *dpyPacked)
236 {
237     return TryLockCurrentContext(thread);
238 }
239 
GetContextLock_CreateImage(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)240 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateImage(Thread *thread,
241                                                                egl::Display *dpyPacked,
242                                                                gl::ContextID ctxPacked)
243 {
244     return TryLockContext(dpyPacked, ctxPacked);
245 }
246 
247 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePlatformPixmapSurface(Thread * thread,egl::Display * dpyPacked)248 GetContextLock_CreatePlatformPixmapSurface(Thread *thread, egl::Display *dpyPacked)
249 {
250     return {};
251 }
252 
253 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePlatformWindowSurface(Thread * thread,egl::Display * dpyPacked)254 GetContextLock_CreatePlatformWindowSurface(Thread *thread, egl::Display *dpyPacked)
255 {
256     return {};
257 }
258 
GetContextLock_CreateSync(Thread * thread,egl::Display * dpyPacked)259 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateSync(Thread *thread,
260                                                               egl::Display *dpyPacked)
261 {
262     return TryLockCurrentContext(thread);
263 }
264 
GetContextLock_DestroyImage(Thread * thread,egl::Display * dpyPacked)265 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroyImage(Thread *thread,
266                                                                 egl::Display *dpyPacked)
267 {
268     // Explicit lock in egl::Display::destroyImageImpl()
269     return {};
270 }
271 
GetContextLock_DestroySync(Thread * thread,egl::Display * dpyPacked)272 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroySync(Thread *thread,
273                                                                egl::Display *dpyPacked)
274 {
275     return {};
276 }
277 
GetContextLock_GetPlatformDisplay(Thread * thread)278 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetPlatformDisplay(Thread *thread)
279 {
280     return {};
281 }
282 
GetContextLock_GetSyncAttrib(Thread * thread,egl::Display * dpyPacked,EGLint attribute)283 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetSyncAttrib(Thread *thread,
284                                                                  egl::Display *dpyPacked,
285                                                                  EGLint attribute)
286 {
287     return {};
288 }
289 
GetContextLock_WaitSync(Thread * thread,egl::Display * dpyPacked)290 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitSync(Thread *thread, egl::Display *dpyPacked)
291 {
292     return TryLockCurrentContext(thread);
293 }
294 
295 // EGL_ANDROID_blob_cache
GetContextLock_SetBlobCacheFuncsANDROID(Thread * thread,egl::Display * dpyPacked)296 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SetBlobCacheFuncsANDROID(Thread *thread,
297                                                                             egl::Display *dpyPacked)
298 {
299     return {};
300 }
301 
302 // EGL_ANDROID_create_native_client_buffer
GetContextLock_CreateNativeClientBufferANDROID(Thread * thread)303 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateNativeClientBufferANDROID(Thread *thread)
304 {
305     return {};
306 }
307 
308 // EGL_ANDROID_get_frame_timestamps
309 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_GetCompositorTimingSupportedANDROID(Thread * thread,egl::Display * dpyPacked)310 GetContextLock_GetCompositorTimingSupportedANDROID(Thread *thread, egl::Display *dpyPacked)
311 {
312     return {};
313 }
314 
315 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_GetCompositorTimingANDROID(Thread * thread,egl::Display * dpyPacked)316 GetContextLock_GetCompositorTimingANDROID(Thread *thread, egl::Display *dpyPacked)
317 {
318     return {};
319 }
320 
GetContextLock_GetNextFrameIdANDROID(Thread * thread,egl::Display * dpyPacked)321 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetNextFrameIdANDROID(Thread *thread,
322                                                                          egl::Display *dpyPacked)
323 {
324     return {};
325 }
326 
327 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_GetFrameTimestampSupportedANDROID(Thread * thread,egl::Display * dpyPacked)328 GetContextLock_GetFrameTimestampSupportedANDROID(Thread *thread, egl::Display *dpyPacked)
329 {
330     return {};
331 }
332 
333 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_GetFrameTimestampsANDROID(Thread * thread,egl::Display * dpyPacked)334 GetContextLock_GetFrameTimestampsANDROID(Thread *thread, egl::Display *dpyPacked)
335 {
336     return {};
337 }
338 
339 // EGL_ANDROID_get_native_client_buffer
GetContextLock_GetNativeClientBufferANDROID(Thread * thread)340 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetNativeClientBufferANDROID(Thread *thread)
341 {
342     return {};
343 }
344 
345 // EGL_ANDROID_native_fence_sync
GetContextLock_DupNativeFenceFDANDROID(Thread * thread,egl::Display * dpyPacked)346 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DupNativeFenceFDANDROID(Thread *thread,
347                                                                            egl::Display *dpyPacked)
348 {
349     return {};
350 }
351 
352 // EGL_ANDROID_presentation_time
GetContextLock_PresentationTimeANDROID(Thread * thread,egl::Display * dpyPacked)353 ANGLE_INLINE ScopedContextMutexLock GetContextLock_PresentationTimeANDROID(Thread *thread,
354                                                                            egl::Display *dpyPacked)
355 {
356     return {};
357 }
358 
359 // EGL_ANGLE_device_creation
GetContextLock_CreateDeviceANGLE(Thread * thread)360 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateDeviceANGLE(Thread *thread)
361 {
362     return {};
363 }
364 
GetContextLock_ReleaseDeviceANGLE(Thread * thread)365 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ReleaseDeviceANGLE(Thread *thread)
366 {
367     return {};
368 }
369 
370 // EGL_ANGLE_external_context_and_surface
371 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_AcquireExternalContextANGLE(Thread * thread,egl::Display * dpyPacked)372 GetContextLock_AcquireExternalContextANGLE(Thread *thread, egl::Display *dpyPacked)
373 {
374     return TryLockCurrentContext(thread);
375 }
376 
377 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_ReleaseExternalContextANGLE(Thread * thread,egl::Display * dpyPacked)378 GetContextLock_ReleaseExternalContextANGLE(Thread *thread, egl::Display *dpyPacked)
379 {
380     return TryLockCurrentContext(thread);
381 }
382 
383 // EGL_ANGLE_feature_control
GetContextLock_QueryStringiANGLE(Thread * thread,egl::Display * dpyPacked)384 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryStringiANGLE(Thread *thread,
385                                                                      egl::Display *dpyPacked)
386 {
387     return {};
388 }
389 
GetContextLock_QueryDisplayAttribANGLE(Thread * thread,egl::Display * dpyPacked,EGLint attribute)390 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDisplayAttribANGLE(Thread *thread,
391                                                                            egl::Display *dpyPacked,
392                                                                            EGLint attribute)
393 {
394     return {};
395 }
396 
397 // EGL_ANGLE_metal_shared_event_sync
398 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CopyMetalSharedEventANGLE(Thread * thread,egl::Display * dpyPacked)399 GetContextLock_CopyMetalSharedEventANGLE(Thread *thread, egl::Display *dpyPacked)
400 {
401     return {};
402 }
403 
404 // EGL_ANGLE_power_preference
GetContextLock_ReleaseHighPowerGPUANGLE(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)405 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ReleaseHighPowerGPUANGLE(Thread *thread,
406                                                                             egl::Display *dpyPacked,
407                                                                             gl::ContextID ctxPacked)
408 {
409     return TryLockContext(dpyPacked, ctxPacked);
410 }
411 
412 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_ReacquireHighPowerGPUANGLE(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)413 GetContextLock_ReacquireHighPowerGPUANGLE(Thread *thread,
414                                           egl::Display *dpyPacked,
415                                           gl::ContextID ctxPacked)
416 {
417     return TryLockContext(dpyPacked, ctxPacked);
418 }
419 
GetContextLock_HandleGPUSwitchANGLE(Thread * thread,egl::Display * dpyPacked)420 ANGLE_INLINE ScopedContextMutexLock GetContextLock_HandleGPUSwitchANGLE(Thread *thread,
421                                                                         egl::Display *dpyPacked)
422 {
423     return {};
424 }
425 
GetContextLock_ForceGPUSwitchANGLE(Thread * thread,egl::Display * dpyPacked)426 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ForceGPUSwitchANGLE(Thread *thread,
427                                                                        egl::Display *dpyPacked)
428 {
429     return {};
430 }
431 
432 // EGL_ANGLE_prepare_swap_buffers
GetContextLock_PrepareSwapBuffersANGLE(Thread * thread,egl::Display * dpyPacked)433 ANGLE_INLINE ScopedContextMutexLock GetContextLock_PrepareSwapBuffersANGLE(Thread *thread,
434                                                                            egl::Display *dpyPacked)
435 {
436     return TryLockCurrentContext(thread);
437 }
438 
439 // EGL_ANGLE_program_cache_control
440 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_ProgramCacheGetAttribANGLE(Thread * thread,egl::Display * dpyPacked)441 GetContextLock_ProgramCacheGetAttribANGLE(Thread *thread, egl::Display *dpyPacked)
442 {
443     return {};
444 }
445 
GetContextLock_ProgramCacheQueryANGLE(Thread * thread,egl::Display * dpyPacked)446 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ProgramCacheQueryANGLE(Thread *thread,
447                                                                           egl::Display *dpyPacked)
448 {
449     return {};
450 }
451 
452 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_ProgramCachePopulateANGLE(Thread * thread,egl::Display * dpyPacked)453 GetContextLock_ProgramCachePopulateANGLE(Thread *thread, egl::Display *dpyPacked)
454 {
455     return {};
456 }
457 
GetContextLock_ProgramCacheResizeANGLE(Thread * thread,egl::Display * dpyPacked)458 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ProgramCacheResizeANGLE(Thread *thread,
459                                                                            egl::Display *dpyPacked)
460 {
461     return {};
462 }
463 
464 // EGL_ANGLE_query_surface_pointer
GetContextLock_QuerySurfacePointerANGLE(Thread * thread,egl::Display * dpyPacked,EGLint attribute)465 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QuerySurfacePointerANGLE(Thread *thread,
466                                                                             egl::Display *dpyPacked,
467                                                                             EGLint attribute)
468 {
469     return {};
470 }
471 
472 // EGL_ANGLE_stream_producer_d3d_texture
473 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreateStreamProducerD3DTextureANGLE(Thread * thread,egl::Display * dpyPacked)474 GetContextLock_CreateStreamProducerD3DTextureANGLE(Thread *thread, egl::Display *dpyPacked)
475 {
476     return {};
477 }
478 
479 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_StreamPostD3DTextureANGLE(Thread * thread,egl::Display * dpyPacked)480 GetContextLock_StreamPostD3DTextureANGLE(Thread *thread, egl::Display *dpyPacked)
481 {
482     return {};
483 }
484 
485 // EGL_ANGLE_swap_with_frame_token
486 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_SwapBuffersWithFrameTokenANGLE(Thread * thread,egl::Display * dpyPacked)487 GetContextLock_SwapBuffersWithFrameTokenANGLE(Thread *thread, egl::Display *dpyPacked)
488 {
489     return TryLockCurrentContext(thread);
490 }
491 
492 // EGL_ANGLE_sync_control_rate
GetContextLock_GetMscRateANGLE(Thread * thread,egl::Display * dpyPacked)493 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetMscRateANGLE(Thread *thread,
494                                                                    egl::Display *dpyPacked)
495 {
496     return {};
497 }
498 
499 // EGL_ANGLE_vulkan_image
GetContextLock_ExportVkImageANGLE(Thread * thread,egl::Display * dpyPacked)500 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ExportVkImageANGLE(Thread *thread,
501                                                                       egl::Display *dpyPacked)
502 {
503     return {};
504 }
505 
506 // EGL_ANGLE_wait_until_work_scheduled
507 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_WaitUntilWorkScheduledANGLE(Thread * thread,egl::Display * dpyPacked)508 GetContextLock_WaitUntilWorkScheduledANGLE(Thread *thread, egl::Display *dpyPacked)
509 {
510     return {};
511 }
512 
513 // EGL_CHROMIUM_sync_control
GetContextLock_GetSyncValuesCHROMIUM(Thread * thread,egl::Display * dpyPacked)514 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetSyncValuesCHROMIUM(Thread *thread,
515                                                                          egl::Display *dpyPacked)
516 {
517     return {};
518 }
519 
520 // EGL_EXT_device_query
GetContextLock_QueryDeviceAttribEXT(Thread * thread,EGLint attribute)521 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDeviceAttribEXT(Thread *thread,
522                                                                         EGLint attribute)
523 {
524     return {};
525 }
526 
GetContextLock_QueryDeviceStringEXT(Thread * thread)527 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDeviceStringEXT(Thread *thread)
528 {
529     return {};
530 }
531 
GetContextLock_QueryDisplayAttribEXT(Thread * thread,egl::Display * dpyPacked,EGLint attribute)532 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDisplayAttribEXT(Thread *thread,
533                                                                          egl::Display *dpyPacked,
534                                                                          EGLint attribute)
535 {
536     return {};
537 }
538 
539 // EGL_EXT_image_dma_buf_import_modifiers
GetContextLock_QueryDmaBufFormatsEXT(Thread * thread,egl::Display * dpyPacked)540 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDmaBufFormatsEXT(Thread *thread,
541                                                                          egl::Display *dpyPacked)
542 {
543     return {};
544 }
545 
GetContextLock_QueryDmaBufModifiersEXT(Thread * thread,egl::Display * dpyPacked)546 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDmaBufModifiersEXT(Thread *thread,
547                                                                            egl::Display *dpyPacked)
548 {
549     return {};
550 }
551 
552 // EGL_EXT_platform_base
553 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePlatformPixmapSurfaceEXT(Thread * thread,egl::Display * dpyPacked)554 GetContextLock_CreatePlatformPixmapSurfaceEXT(Thread *thread, egl::Display *dpyPacked)
555 {
556     return {};
557 }
558 
559 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_CreatePlatformWindowSurfaceEXT(Thread * thread,egl::Display * dpyPacked)560 GetContextLock_CreatePlatformWindowSurfaceEXT(Thread *thread, egl::Display *dpyPacked)
561 {
562     return {};
563 }
564 
GetContextLock_GetPlatformDisplayEXT(Thread * thread)565 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetPlatformDisplayEXT(Thread *thread)
566 {
567     return {};
568 }
569 
570 // EGL_KHR_debug
GetContextLock_DebugMessageControlKHR(Thread * thread)571 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DebugMessageControlKHR(Thread *thread)
572 {
573     return {};
574 }
575 
GetContextLock_LabelObjectKHR(Thread * thread,egl::Display * dpyPacked)576 ANGLE_INLINE ScopedContextMutexLock GetContextLock_LabelObjectKHR(Thread *thread,
577                                                                   egl::Display *dpyPacked)
578 {
579     return {};
580 }
581 
GetContextLock_QueryDebugKHR(Thread * thread,EGLint attribute)582 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryDebugKHR(Thread *thread, EGLint attribute)
583 {
584     return {};
585 }
586 
587 // EGL_KHR_fence_sync
GetContextLock_ClientWaitSyncKHR(Thread * thread,egl::Display * dpyPacked)588 ANGLE_INLINE ScopedContextMutexLock GetContextLock_ClientWaitSyncKHR(Thread *thread,
589                                                                      egl::Display *dpyPacked)
590 {
591     return TryLockCurrentContext(thread);
592 }
593 
GetContextLock_CreateSyncKHR(Thread * thread,egl::Display * dpyPacked)594 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateSyncKHR(Thread *thread,
595                                                                  egl::Display *dpyPacked)
596 {
597     return TryLockCurrentContext(thread);
598 }
599 
GetContextLock_DestroySyncKHR(Thread * thread,egl::Display * dpyPacked)600 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroySyncKHR(Thread *thread,
601                                                                   egl::Display *dpyPacked)
602 {
603     return {};
604 }
605 
GetContextLock_GetSyncAttribKHR(Thread * thread,egl::Display * dpyPacked,EGLint attribute)606 ANGLE_INLINE ScopedContextMutexLock GetContextLock_GetSyncAttribKHR(Thread *thread,
607                                                                     egl::Display *dpyPacked,
608                                                                     EGLint attribute)
609 {
610     return {};
611 }
612 
613 // EGL_KHR_image
GetContextLock_CreateImageKHR(Thread * thread,egl::Display * dpyPacked,gl::ContextID ctxPacked)614 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateImageKHR(Thread *thread,
615                                                                   egl::Display *dpyPacked,
616                                                                   gl::ContextID ctxPacked)
617 {
618     return TryLockContext(dpyPacked, ctxPacked);
619 }
620 
GetContextLock_DestroyImageKHR(Thread * thread,egl::Display * dpyPacked)621 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroyImageKHR(Thread *thread,
622                                                                    egl::Display *dpyPacked)
623 {
624     // Explicit lock in egl::Display::destroyImageImpl()
625     return {};
626 }
627 
628 // EGL_KHR_lock_surface3
GetContextLock_LockSurfaceKHR(Thread * thread,egl::Display * dpyPacked)629 ANGLE_INLINE ScopedContextMutexLock GetContextLock_LockSurfaceKHR(Thread *thread,
630                                                                   egl::Display *dpyPacked)
631 {
632     return {};
633 }
634 
GetContextLock_QuerySurface64KHR(Thread * thread,egl::Display * dpyPacked,EGLint attribute)635 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QuerySurface64KHR(Thread *thread,
636                                                                      egl::Display *dpyPacked,
637                                                                      EGLint attribute)
638 {
639     return {};
640 }
641 
GetContextLock_UnlockSurfaceKHR(Thread * thread,egl::Display * dpyPacked)642 ANGLE_INLINE ScopedContextMutexLock GetContextLock_UnlockSurfaceKHR(Thread *thread,
643                                                                     egl::Display *dpyPacked)
644 {
645     return {};
646 }
647 
648 // EGL_KHR_partial_update
GetContextLock_SetDamageRegionKHR(Thread * thread,egl::Display * dpyPacked)649 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SetDamageRegionKHR(Thread *thread,
650                                                                       egl::Display *dpyPacked)
651 {
652     return {};
653 }
654 
655 // EGL_KHR_reusable_sync
GetContextLock_SignalSyncKHR(Thread * thread,egl::Display * dpyPacked)656 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SignalSyncKHR(Thread *thread,
657                                                                  egl::Display *dpyPacked)
658 {
659     return TryLockCurrentContext(thread);
660 }
661 
662 // EGL_KHR_stream
GetContextLock_CreateStreamKHR(Thread * thread,egl::Display * dpyPacked)663 ANGLE_INLINE ScopedContextMutexLock GetContextLock_CreateStreamKHR(Thread *thread,
664                                                                    egl::Display *dpyPacked)
665 {
666     return {};
667 }
668 
GetContextLock_DestroyStreamKHR(Thread * thread,egl::Display * dpyPacked)669 ANGLE_INLINE ScopedContextMutexLock GetContextLock_DestroyStreamKHR(Thread *thread,
670                                                                     egl::Display *dpyPacked)
671 {
672     return {};
673 }
674 
GetContextLock_QueryStreamKHR(Thread * thread,egl::Display * dpyPacked,EGLenum attribute)675 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryStreamKHR(Thread *thread,
676                                                                   egl::Display *dpyPacked,
677                                                                   EGLenum attribute)
678 {
679     return {};
680 }
681 
GetContextLock_QueryStreamu64KHR(Thread * thread,egl::Display * dpyPacked,EGLenum attribute)682 ANGLE_INLINE ScopedContextMutexLock GetContextLock_QueryStreamu64KHR(Thread *thread,
683                                                                      egl::Display *dpyPacked,
684                                                                      EGLenum attribute)
685 {
686     return {};
687 }
688 
GetContextLock_StreamAttribKHR(Thread * thread,egl::Display * dpyPacked,EGLenum attribute)689 ANGLE_INLINE ScopedContextMutexLock GetContextLock_StreamAttribKHR(Thread *thread,
690                                                                    egl::Display *dpyPacked,
691                                                                    EGLenum attribute)
692 {
693     return {};
694 }
695 
696 // EGL_KHR_stream_consumer_gltexture
GetContextLock_StreamConsumerAcquireKHR(Thread * thread,egl::Display * dpyPacked)697 ANGLE_INLINE ScopedContextMutexLock GetContextLock_StreamConsumerAcquireKHR(Thread *thread,
698                                                                             egl::Display *dpyPacked)
699 {
700     return TryLockCurrentContext(thread);
701 }
702 
703 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_StreamConsumerGLTextureExternalKHR(Thread * thread,egl::Display * dpyPacked)704 GetContextLock_StreamConsumerGLTextureExternalKHR(Thread *thread, egl::Display *dpyPacked)
705 {
706     return TryLockCurrentContext(thread);
707 }
708 
GetContextLock_StreamConsumerReleaseKHR(Thread * thread,egl::Display * dpyPacked)709 ANGLE_INLINE ScopedContextMutexLock GetContextLock_StreamConsumerReleaseKHR(Thread *thread,
710                                                                             egl::Display *dpyPacked)
711 {
712     return TryLockCurrentContext(thread);
713 }
714 
715 // EGL_KHR_swap_buffers_with_damage
GetContextLock_SwapBuffersWithDamageKHR(Thread * thread,egl::Display * dpyPacked)716 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SwapBuffersWithDamageKHR(Thread *thread,
717                                                                             egl::Display *dpyPacked)
718 {
719     return TryLockCurrentContext(thread);
720 }
721 
722 // EGL_KHR_wait_sync
GetContextLock_WaitSyncKHR(Thread * thread,egl::Display * dpyPacked)723 ANGLE_INLINE ScopedContextMutexLock GetContextLock_WaitSyncKHR(Thread *thread,
724                                                                egl::Display *dpyPacked)
725 {
726     return TryLockCurrentContext(thread);
727 }
728 
729 // EGL_NV_post_sub_buffer
GetContextLock_PostSubBufferNV(Thread * thread,egl::Display * dpyPacked)730 ANGLE_INLINE ScopedContextMutexLock GetContextLock_PostSubBufferNV(Thread *thread,
731                                                                    egl::Display *dpyPacked)
732 {
733     return TryLockCurrentContext(thread);
734 }
735 
736 // EGL_NV_stream_consumer_gltexture_yuv
737 ANGLE_INLINE ScopedContextMutexLock
GetContextLock_StreamConsumerGLTextureExternalAttribsNV(Thread * thread,egl::Display * dpyPacked)738 GetContextLock_StreamConsumerGLTextureExternalAttribsNV(Thread *thread, egl::Display *dpyPacked)
739 {
740     return TryLockCurrentContext(thread);
741 }
742 
743 // EGL_ANGLE_no_error
GetContextLock_SetValidationEnabledANGLE(Thread * thread)744 ANGLE_INLINE ScopedContextMutexLock GetContextLock_SetValidationEnabledANGLE(Thread *thread)
745 {
746     return {};
747 }
748 
749 }  // namespace egl
750 
751 #endif  // LIBGLESV2_EGL_CONTEXT_LOCK_IMPL_H_
752