Lines Matching full:thread
19 #include "libANGLE/Thread.h"
60 Thread *thread = egl::GetCurrentThread(); in EGL_GetError() local
62 EGLint error = thread->getError(); in EGL_GetError()
63 thread->setSuccess(); in EGL_GetError()
81 Thread *thread = egl::GetCurrentThread(); in EGL_Initialize() local
84 ANGLE_EGL_TRY_RETURN(thread, ValidateInitialize(display), "eglInitialize", in EGL_Initialize()
87 ANGLE_EGL_TRY_RETURN(thread, display->initialize(), "eglInitialize", GetDisplayIfValid(display), in EGL_Initialize()
95 thread->setSuccess(); in EGL_Initialize()
103 Thread *thread = egl::GetCurrentThread(); in EGL_Terminate() local
106 ANGLE_EGL_TRY_RETURN(thread, ValidateTerminate(display), "eglTerminate", in EGL_Terminate()
109 ANGLE_EGL_TRY_RETURN(thread, display->makeCurrent(thread, nullptr, nullptr, nullptr), in EGL_Terminate()
111 SetContextCurrent(thread, nullptr); in EGL_Terminate()
112 ANGLE_EGL_TRY_RETURN(thread, display->terminate(thread), "eglTerminate", in EGL_Terminate()
115 thread->setSuccess(); in EGL_Terminate()
123 Thread *thread = egl::GetCurrentThread(); in EGL_QueryString() local
128 ANGLE_EGL_TRY_RETURN(thread, ValidateDisplay(display), "eglQueryString", in EGL_QueryString()
155 thread->setError(EglBadParameter(), GetDebug(), "eglQueryString", in EGL_QueryString()
160 thread->setSuccess(); in EGL_QueryString()
174 Thread *thread = egl::GetCurrentThread(); in EGL_GetConfigs() local
178 ANGLE_EGL_TRY_RETURN(thread, ValidateGetConfigs(display, config_size, num_config), in EGL_GetConfigs()
183 thread->setSuccess(); in EGL_GetConfigs()
200 Thread *thread = egl::GetCurrentThread(); in EGL_ChooseConfig() local
205 ANGLE_EGL_TRY_RETURN(thread, ValidateChooseConfig(display, attribMap, config_size, num_config), in EGL_ChooseConfig()
210 thread->setSuccess(); in EGL_ChooseConfig()
224 Thread *thread = egl::GetCurrentThread(); in EGL_GetConfigAttrib() local
229 ANGLE_EGL_TRY_RETURN(thread, ValidateGetConfigAttrib(display, configuration, attribute), in EGL_GetConfigAttrib()
234 thread->setSuccess(); in EGL_GetConfigAttrib()
249 Thread *thread = egl::GetCurrentThread(); in EGL_CreateWindowSurface() local
255 ANGLE_EGL_TRY_RETURN(thread, in EGL_CreateWindowSurface()
260 ANGLE_EGL_TRY_RETURN(thread, in EGL_CreateWindowSurface()
276 Thread *thread = egl::GetCurrentThread(); in EGL_CreatePbufferSurface() local
282 ANGLE_EGL_TRY_RETURN(thread, ValidateCreatePbufferSurface(display, configuration, attributes), in EGL_CreatePbufferSurface()
286 ANGLE_EGL_TRY_RETURN(thread, display->createPbufferSurface(configuration, attributes, &surface), in EGL_CreatePbufferSurface()
304 Thread *thread = egl::GetCurrentThread(); in EGL_CreatePixmapSurface() local
309 ANGLE_EGL_TRY_RETURN(thread, ValidateConfig(display, configuration), "eglCreatePixmapSurface", in EGL_CreatePixmapSurface()
314 thread->setSuccess(); in EGL_CreatePixmapSurface()
323 Thread *thread = egl::GetCurrentThread(); in EGL_DestroySurface() local
328 ANGLE_EGL_TRY_RETURN(thread, ValidateDestroySurface(display, eglSurface, surface), in EGL_DestroySurface()
331 ANGLE_EGL_TRY_RETURN(thread, display->destroySurface(eglSurface), "eglDestroySurface", in EGL_DestroySurface()
334 thread->setSuccess(); in EGL_DestroySurface()
348 Thread *thread = egl::GetCurrentThread(); in EGL_QuerySurface() local
353 ANGLE_EGL_TRY_RETURN(thread, ValidateQuerySurface(display, eglSurface, attribute, value), in EGL_QuerySurface()
358 thread->setSuccess(); in EGL_QuerySurface()
372 Thread *thread = egl::GetCurrentThread(); in EGL_CreateContext() local
379 ANGLE_EGL_TRY_RETURN(thread, in EGL_CreateContext()
384 ANGLE_EGL_TRY_RETURN(thread, in EGL_CreateContext()
385 display->createContext(configuration, sharedGLContext, thread->getAPI(), in EGL_CreateContext()
389 thread->setSuccess(); in EGL_CreateContext()
398 Thread *thread = egl::GetCurrentThread(); in EGL_DestroyContext() local
403 ANGLE_EGL_TRY_RETURN(thread, ValidateDestroyContext(display, context, ctx), "eglDestroyContext", in EGL_DestroyContext()
406 bool contextWasCurrent = context == thread->getContext(); in EGL_DestroyContext()
408 ANGLE_EGL_TRY_RETURN(thread, display->destroyContext(thread, context), "eglDestroyContext", in EGL_DestroyContext()
413 SetContextCurrent(thread, nullptr); in EGL_DestroyContext()
416 thread->setSuccess(); in EGL_DestroyContext()
431 Thread *thread = egl::GetCurrentThread(); in EGL_MakeCurrent() local
438 ANGLE_EGL_TRY_RETURN(thread, ValidateMakeCurrent(display, drawSurface, readSurface, context), in EGL_MakeCurrent()
441 Surface *previousDraw = thread->getCurrentDrawSurface(); in EGL_MakeCurrent()
442 Surface *previousRead = thread->getCurrentReadSurface(); in EGL_MakeCurrent()
443 gl::Context *previousContext = thread->getContext(); in EGL_MakeCurrent()
448 ANGLE_EGL_TRY_RETURN(thread, in EGL_MakeCurrent()
449 display->makeCurrent(thread, drawSurface, readSurface, context), in EGL_MakeCurrent()
452 SetContextCurrent(thread, context); in EGL_MakeCurrent()
455 thread->setSuccess(); in EGL_MakeCurrent()
463 Thread *thread = egl::GetCurrentThread(); in EGL_GetCurrentSurface() local
467 thread->setSuccess(); in EGL_GetCurrentSurface()
468 return thread->getCurrentReadSurface(); in EGL_GetCurrentSurface()
472 thread->setSuccess(); in EGL_GetCurrentSurface()
473 return thread->getCurrentDrawSurface(); in EGL_GetCurrentSurface()
477 thread->setError(EglBadParameter(), GetDebug(), "eglGetCurrentSurface", nullptr); in EGL_GetCurrentSurface()
486 Thread *thread = egl::GetCurrentThread(); in EGL_GetCurrentDisplay() local
488 thread->setSuccess(); in EGL_GetCurrentDisplay()
489 if (thread->getContext() != nullptr) in EGL_GetCurrentDisplay()
491 return thread->getContext()->getDisplay(); in EGL_GetCurrentDisplay()
507 Thread *thread = egl::GetCurrentThread(); in EGL_QueryContext() local
512 ANGLE_EGL_TRY_RETURN(thread, ValidateQueryContext(display, context, attribute, value), in EGL_QueryContext()
517 thread->setSuccess(); in EGL_QueryContext()
525 Thread *thread = egl::GetCurrentThread(); in EGL_WaitGL() local
527 egl::Display *display = thread->getDisplay(); in EGL_WaitGL()
529 ANGLE_EGL_TRY_RETURN(thread, ValidateDisplay(display), "eglWaitGL", GetDisplayIfValid(display), in EGL_WaitGL()
534 ANGLE_EGL_TRY_RETURN(thread, display->waitClient(thread->getContext()), "eglWaitGL", in EGL_WaitGL()
537 thread->setSuccess(); in EGL_WaitGL()
545 Thread *thread = egl::GetCurrentThread(); in EGL_WaitNative() local
547 egl::Display *display = thread->getDisplay(); in EGL_WaitNative()
549 ANGLE_EGL_TRY_RETURN(thread, ValidateWaitNative(display, engine), "eglWaitNative", in EGL_WaitNative()
550 GetThreadIfValid(thread), EGL_FALSE); in EGL_WaitNative()
552 ANGLE_EGL_TRY_RETURN(thread, display->waitNative(thread->getContext(), engine), "eglWaitNative", in EGL_WaitNative()
553 GetThreadIfValid(thread), EGL_FALSE); in EGL_WaitNative()
555 thread->setSuccess(); in EGL_WaitNative()
564 Thread *thread = egl::GetCurrentThread(); in EGL_SwapBuffers() local
569 ANGLE_EGL_TRY_RETURN(thread, ValidateSwapBuffers(thread, display, eglSurface), "eglSwapBuffers", in EGL_SwapBuffers()
572 ANGLE_EGL_TRY_RETURN(thread, eglSurface->swap(thread->getContext()), "eglSwapBuffers", in EGL_SwapBuffers()
575 thread->setSuccess(); in EGL_SwapBuffers()
588 Thread *thread = egl::GetCurrentThread(); in EGL_CopyBuffers() local
593 ANGLE_EGL_TRY_RETURN(thread, ValidateCopyBuffers(display, eglSurface), "eglCopyBuffers", in EGL_CopyBuffers()
598 thread->setSuccess(); in EGL_CopyBuffers()
609 Thread *thread = egl::GetCurrentThread(); in EGL_BindTexImage() local
613 gl::Context *context = thread->getContext(); in EGL_BindTexImage()
617 thread, ValidateBindTexImage(display, eglSurface, surface, buffer, context, &textureObject), in EGL_BindTexImage()
622 ANGLE_EGL_TRY_RETURN(thread, eglSurface->bindTexImage(context, textureObject, buffer), in EGL_BindTexImage()
626 thread->setSuccess(); in EGL_BindTexImage()
640 Thread *thread = egl::GetCurrentThread(); in EGL_SurfaceAttrib() local
645 ANGLE_EGL_TRY_RETURN(thread, ValidateSurfaceAttrib(display, eglSurface, attribute, value), in EGL_SurfaceAttrib()
650 thread->setSuccess(); in EGL_SurfaceAttrib()
660 Thread *thread = egl::GetCurrentThread(); in EGL_ReleaseTexImage() local
665 ANGLE_EGL_TRY_RETURN(thread, ValidateReleaseTexImage(display, eglSurface, surface, buffer), in EGL_ReleaseTexImage()
672 ANGLE_EGL_TRY_RETURN(thread, eglSurface->releaseTexImage(thread->getContext(), buffer), in EGL_ReleaseTexImage()
677 thread->setSuccess(); in EGL_ReleaseTexImage()
686 Thread *thread = egl::GetCurrentThread(); in EGL_SwapInterval() local
687 gl::Context *context = thread->getContext(); in EGL_SwapInterval()
690 Surface *draw_surface = static_cast<Surface *>(thread->getCurrentDrawSurface()); in EGL_SwapInterval()
692 ANGLE_EGL_TRY_RETURN(thread, ValidateSwapInterval(display, draw_surface, context), in EGL_SwapInterval()
701 thread->setSuccess(); in EGL_SwapInterval()
710 Thread *thread = egl::GetCurrentThread(); in EGL_BindAPI() local
712 ANGLE_EGL_TRY_RETURN(thread, ValidateBindAPI(api), "eglBindAPI", GetThreadIfValid(thread), in EGL_BindAPI()
715 thread->setAPI(api); in EGL_BindAPI()
717 thread->setSuccess(); in EGL_BindAPI()
725 Thread *thread = egl::GetCurrentThread(); in EGL_QueryAPI() local
727 EGLenum API = thread->getAPI(); in EGL_QueryAPI()
729 thread->setSuccess(); in EGL_QueryAPI()
746 Thread *thread = egl::GetCurrentThread(); in EGL_CreatePbufferFromClientBuffer() local
753 thread, in EGL_CreatePbufferFromClientBuffer()
758 ANGLE_EGL_TRY_RETURN(thread, in EGL_CreatePbufferFromClientBuffer()
771 Thread *thread = egl::GetCurrentThread(); in EGL_ReleaseThread() local
773 Surface *previousDraw = thread->getCurrentDrawSurface(); in EGL_ReleaseThread()
774 Surface *previousRead = thread->getCurrentReadSurface(); in EGL_ReleaseThread()
775 gl::Context *previousContext = thread->getContext(); in EGL_ReleaseThread()
776 egl::Display *previousDisplay = thread->getDisplay(); in EGL_ReleaseThread()
784 ANGLE_EGL_TRY_RETURN(thread, in EGL_ReleaseThread()
785 previousDisplay->makeCurrent(thread, nullptr, nullptr, nullptr), in EGL_ReleaseThread()
789 SetContextCurrent(thread, nullptr); in EGL_ReleaseThread()
792 thread->setSuccess(); in EGL_ReleaseThread()
800 Thread *thread = egl::GetCurrentThread(); in EGL_WaitClient() local
802 egl::Display *display = thread->getDisplay(); in EGL_WaitClient()
803 gl::Context *context = thread->getContext(); in EGL_WaitClient()
805 ANGLE_EGL_TRY_RETURN(thread, ValidateDisplay(display), "eglWaitClient", in EGL_WaitClient()
808 ANGLE_EGL_TRY_RETURN(thread, display->waitClient(context), "eglWaitClient", in EGL_WaitClient()
811 thread->setSuccess(); in EGL_WaitClient()
820 Thread *thread = egl::GetCurrentThread(); in EGL_GetCurrentContext() local
822 gl::Context *context = thread->getContext(); in EGL_GetCurrentContext()
824 thread->setSuccess(); in EGL_GetCurrentContext()
836 Thread *thread = egl::GetCurrentThread(); in EGL_CreateSync() local
840 gl::Context *currentContext = thread->getContext(); in EGL_CreateSync()
844 thread, ValidateCreateSyncKHR(display, type, attributes, currentDisplay, currentContext), in EGL_CreateSync()
848 ANGLE_EGL_TRY_RETURN(thread, display->createSync(currentContext, type, attributes, &syncObject), in EGL_CreateSync()
851 thread->setSuccess(); in EGL_CreateSync()
861 Thread *thread = egl::GetCurrentThread(); in EGL_DestroySync() local
865 ANGLE_EGL_TRY_RETURN(thread, ValidateDestroySync(display, syncObject), "eglDestroySync", in EGL_DestroySync()
870 thread->setSuccess(); in EGL_DestroySync()
882 Thread *thread = egl::GetCurrentThread(); in EGL_ClientWaitSync() local
886 ANGLE_EGL_TRY_RETURN(thread, ValidateClientWaitSync(display, syncObject, flags, timeout), in EGL_ClientWaitSync()
889 gl::Context *currentContext = thread->getContext(); in EGL_ClientWaitSync()
892 thread, syncObject->clientWait(display, currentContext, flags, timeout, &syncStatus), in EGL_ClientWaitSync()
895 thread->setSuccess(); in EGL_ClientWaitSync()
910 Thread *thread = egl::GetCurrentThread(); in EGL_GetSyncAttrib() local
914 ANGLE_EGL_TRY_RETURN(thread, ValidateGetSyncAttrib(display, syncObject, attribute, value), in EGL_GetSyncAttrib()
918 ANGLE_EGL_TRY_RETURN(thread, GetSyncAttrib(display, syncObject, attribute, &valueExt), in EGL_GetSyncAttrib()
922 thread->setSuccess(); in EGL_GetSyncAttrib()
939 Thread *thread = egl::GetCurrentThread(); in EGL_CreateImage() local
948 thread->setError(error, GetDebug(), "eglCreateImage", GetDisplayIfValid(display)); in EGL_CreateImage()
956 thread->setError(error, GetDebug(), "eglCreateImage", GetDisplayIfValid(display)); in EGL_CreateImage()
960 thread->setSuccess(); in EGL_CreateImage()
969 Thread *thread = egl::GetCurrentThread(); in EGL_DestroyImage() local
976 thread->setError(error, GetDebug(), "eglDestroyImage", GetImageIfValid(display, img)); in EGL_DestroyImage()
982 thread->setSuccess(); in EGL_DestroyImage()
995 Thread *thread = egl::GetCurrentThread(); in EGL_GetPlatformDisplay() local
997 ANGLE_EGL_TRY_RETURN(thread, ValidateGetPlatformDisplay(platform, native_display, attrib_list), in EGL_GetPlatformDisplay()
998 "eglGetPlatformDisplay", GetThreadIfValid(thread), EGL_NO_DISPLAY); in EGL_GetPlatformDisplay()
1029 Thread *thread = egl::GetCurrentThread(); in EGL_CreatePlatformWindowSurface() local
1033 thread->setError(EglBadDisplay() << "eglCreatePlatformWindowSurface unimplemented.", GetDebug(), in EGL_CreatePlatformWindowSurface()
1049 Thread *thread = egl::GetCurrentThread(); in EGL_CreatePlatformPixmapSurface() local
1053 thread->setError(EglBadDisplay() << "eglCreatePlatformPixmapSurface unimplemented.", GetDebug(), in EGL_CreatePlatformPixmapSurface()
1065 Thread *thread = egl::GetCurrentThread(); in EGL_WaitSync() local
1067 gl::Context *context = thread->getContext(); in EGL_WaitSync()
1070 ANGLE_EGL_TRY_RETURN(thread, ValidateWaitSync(display, context, syncObject, flags), in EGL_WaitSync()
1073 gl::Context *currentContext = thread->getContext(); in EGL_WaitSync()
1074 ANGLE_EGL_TRY_RETURN(thread, syncObject->serverWait(display, currentContext, flags), in EGL_WaitSync()
1077 thread->setSuccess(); in EGL_WaitSync()
1085 Thread *thread = egl::GetCurrentThread(); in EGL_GetProcAddress() local
1090 thread->setSuccess(); in EGL_GetProcAddress()