Lines Matching full:thread
16 #include "libANGLE/Thread.h"
50 EGLBoolean BindAPI(Thread *thread, EGLenum api) in BindAPI() argument
52 thread->setAPI(api); in BindAPI()
54 thread->setSuccess(); in BindAPI()
58 EGLBoolean BindTexImage(Thread *thread, Display *display, egl::SurfaceID surfaceID, EGLint buffer) in BindTexImage() argument
62 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglBindTexImage", in BindTexImage()
65 gl::Context *context = thread->getContext(); in BindTexImage()
71 ANGLE_EGL_TRY_RETURN(thread, eglSurface->bindTexImage(context, textureObject, buffer), in BindTexImage()
75 thread->setSuccess(); in BindTexImage()
79 EGLBoolean ChooseConfig(Thread *thread, in ChooseConfig() argument
88 thread->setSuccess(); in ChooseConfig()
92 EGLint ClientWaitSync(Thread *thread, in ClientWaitSync() argument
98 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglClientWaitSync", in ClientWaitSync()
100 gl::Context *currentContext = thread->getContext(); in ClientWaitSync()
104 thread, syncObject->clientWait(display, currentContext, flags, timeout, &syncStatus), in ClientWaitSync()
110 auto handleErrorStatus = [thread, display, syncID](void *result) { in ClientWaitSync()
115 thread->setError(egl::Error(EGL_BAD_ALLOC), "eglClientWaitSync", in ClientWaitSync()
120 thread->setSuccess(); in ClientWaitSync()
127 thread->setSuccess(); in ClientWaitSync()
132 EGLBoolean CopyBuffers(Thread *thread, in CopyBuffers() argument
137 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglCopyBuffers", in CopyBuffers()
141 thread->setSuccess(); in CopyBuffers()
145 EGLContext CreateContext(Thread *thread, in CreateContext() argument
152 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglCreateContext", in CreateContext()
155 ANGLE_EGL_TRY_RETURN(thread, in CreateContext()
156 display->createContext(configuration, sharedGLContext, thread->getAPI(), in CreateContext()
160 thread->setSuccess(); in CreateContext()
164 EGLImage CreateImage(Thread *thread, in CreateImage() argument
173 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglCreateImage", in CreateImage()
180 thread->setError(error, "eglCreateImage", GetDisplayIfValid(display)); in CreateImage()
184 thread->setSuccess(); in CreateImage()
188 EGLSurface CreatePbufferFromClientBuffer(Thread *thread, in CreatePbufferFromClientBuffer() argument
195 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePbufferFromClientBuffer()
199 ANGLE_EGL_TRY_RETURN(thread, in CreatePbufferFromClientBuffer()
208 EGLSurface CreatePbufferSurface(Thread *thread, in CreatePbufferSurface() argument
213 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePbufferSurface()
217 ANGLE_EGL_TRY_RETURN(thread, display->createPbufferSurface(configuration, attributes, &surface), in CreatePbufferSurface()
223 EGLSurface CreatePixmapSurface(Thread *thread, in CreatePixmapSurface() argument
229 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePixmapSurface()
233 ANGLE_EGL_TRY_RETURN(thread, in CreatePixmapSurface()
237 thread->setSuccess(); in CreatePixmapSurface()
241 EGLSurface CreatePlatformPixmapSurface(Thread *thread, in CreatePlatformPixmapSurface() argument
247 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePlatformPixmapSurface()
253 thread, display->createPixmapSurface(configuration, nativePixmap, attributes, &surface), in CreatePlatformPixmapSurface()
256 thread->setSuccess(); in CreatePlatformPixmapSurface()
260 EGLSurface CreatePlatformWindowSurface(Thread *thread, in CreatePlatformWindowSurface() argument
266 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePlatformWindowSurface()
272 thread, display->createWindowSurface(configuration, nativeWindow, attributes, &surface), in CreatePlatformWindowSurface()
278 EGLSync CreateSync(Thread *thread, Display *display, EGLenum type, const AttributeMap &attributes) in CreateSync() argument
280 gl::Context *currentContext = thread->getContext(); in CreateSync()
282 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglCreateSync", in CreateSync()
285 ANGLE_EGL_TRY_RETURN(thread, display->createSync(currentContext, type, attributes, &syncObject), in CreateSync()
288 thread->setSuccess(); in CreateSync()
292 EGLSurface CreateWindowSurface(Thread *thread, in CreateWindowSurface() argument
298 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreateWindowSurface()
303 ANGLE_EGL_TRY_RETURN(thread, in CreateWindowSurface()
310 EGLBoolean DestroyContext(Thread *thread, Display *display, gl::ContextID contextID) in DestroyContext() argument
314 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglDestroyContext", in DestroyContext()
317 ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread); in DestroyContext()
319 ANGLE_EGL_TRY_RETURN(thread, display->destroyContext(thread, context), "eglDestroyContext", in DestroyContext()
321 thread->setSuccess(); in DestroyContext()
325 EGLBoolean DestroyImage(Thread *thread, Display *display, ImageID imageID) in DestroyImage() argument
328 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglDestroyImage", in DestroyImage()
332 thread->setSuccess(); in DestroyImage()
336 EGLBoolean DestroySurface(Thread *thread, Display *display, egl::SurfaceID surfaceID) in DestroySurface() argument
343 // thread, release the surface by passing EGL_NO_SURFACE to eglMakeCurrent(). in DestroySurface()
346 (thread->getCurrentDrawSurface() == eglSurface || in DestroySurface()
347 thread->getCurrentReadSurface() == eglSurface)) in DestroySurface()
351 const gl::Context *currentContext = thread->getContext(); in DestroySurface()
359 MakeCurrent(thread, display, drawSurface, readSurface, contextID); in DestroySurface()
364 MakeCurrent(thread, display, drawSurface, readSurface, in DestroySurface()
369 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglDestroySurface", in DestroySurface()
372 ANGLE_EGL_TRY_RETURN(thread, display->destroySurface(eglSurface), "eglDestroySurface", in DestroySurface()
375 thread->setSuccess(); in DestroySurface()
379 EGLBoolean DestroySync(Thread *thread, Display *display, SyncID syncID) in DestroySync() argument
382 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglDestroySync", in DestroySync()
386 thread->setSuccess(); in DestroySync()
390 EGLBoolean GetConfigAttrib(Thread *thread, in GetConfigAttrib() argument
398 thread->setSuccess(); in GetConfigAttrib()
402 EGLBoolean GetConfigs(Thread *thread, in GetConfigs() argument
410 thread->setSuccess(); in GetConfigs()
414 EGLContext GetCurrentContext(Thread *thread) in GetCurrentContext() argument
416 gl::Context *context = thread->getContext(); in GetCurrentContext()
418 thread->setSuccess(); in GetCurrentContext()
422 EGLDisplay GetCurrentDisplay(Thread *thread) in GetCurrentDisplay() argument
424 thread->setSuccess(); in GetCurrentDisplay()
425 if (thread->getContext() != nullptr) in GetCurrentDisplay()
427 return thread->getContext()->getDisplay(); in GetCurrentDisplay()
432 EGLSurface GetCurrentSurface(Thread *thread, EGLint readdraw) in GetCurrentSurface() argument
435 (readdraw == EGL_READ) ? thread->getCurrentReadSurface() : thread->getCurrentDrawSurface(); in GetCurrentSurface()
436 thread->setSuccess(); in GetCurrentSurface()
447 EGLDisplay GetDisplay(Thread *thread, EGLNativeDisplayType display_id) in GetDisplay() argument
453 EGLint GetError(Thread *thread) in GetError() argument
455 EGLint error = thread->getError(); in GetError()
456 thread->setSuccess(); in GetError()
460 EGLDisplay GetPlatformDisplay(Thread *thread, in GetPlatformDisplay() argument
488 __eglMustCastToProperFunctionPointerType GetProcAddress(Thread *thread, const char *procname) in GetProcAddress() argument
493 thread->setSuccess(); in GetProcAddress()
503 EGLBoolean GetSyncAttrib(Thread *thread, in GetSyncAttrib() argument
510 ANGLE_EGL_TRY_RETURN(thread, GetSyncAttrib(display, syncID, attribute, &valueExt), in GetSyncAttrib()
514 thread->setSuccess(); in GetSyncAttrib()
518 EGLBoolean Initialize(Thread *thread, Display *display, EGLint *major, EGLint *minor) in Initialize() argument
520 ANGLE_EGL_TRY_RETURN(thread, display->initialize(), "eglInitialize", GetDisplayIfValid(display), in Initialize()
532 thread->setSuccess(); in Initialize()
536 EGLBoolean MakeCurrent(Thread *thread, in MakeCurrent() argument
546 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglMakeCurrent", in MakeCurrent()
548 ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread); in MakeCurrent()
550 Surface *previousDraw = thread->getCurrentDrawSurface(); in MakeCurrent()
551 Surface *previousRead = thread->getCurrentReadSurface(); in MakeCurrent()
552 gl::Context *previousContext = thread->getContext(); in MakeCurrent()
558 thread, in MakeCurrent()
559 display->makeCurrent(thread, previousContext, drawSurface, readSurface, context), in MakeCurrent()
563 thread->setSuccess(); in MakeCurrent()
567 EGLenum QueryAPI(Thread *thread) in QueryAPI() argument
569 EGLenum API = thread->getAPI(); in QueryAPI()
571 thread->setSuccess(); in QueryAPI()
575 EGLBoolean QueryContext(Thread *thread, in QueryContext() argument
583 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglQueryContext", in QueryContext()
587 thread->setSuccess(); in QueryContext()
591 const char *QueryString(Thread *thread, Display *display, EGLint name) in QueryString() argument
595 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglQueryString", in QueryString()
630 thread->setSuccess(); in QueryString()
634 EGLBoolean QuerySurface(Thread *thread, in QuerySurface() argument
642 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglQuerySurface", in QuerySurface()
652 context = thread->getContext(); in QuerySurface()
660 ANGLE_EGL_TRY_RETURN(thread, QuerySurfaceAttrib(display, context, eglSurface, attribute, value), in QuerySurface()
663 thread->setSuccess(); in QuerySurface()
667 EGLBoolean ReleaseTexImage(Thread *thread, in ReleaseTexImage() argument
674 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglReleaseTexImage", in ReleaseTexImage()
676 gl::Context *context = thread->getContext(); in ReleaseTexImage()
683 ANGLE_EGL_TRY_RETURN(thread, eglSurface->releaseTexImage(thread->getContext(), buffer), in ReleaseTexImage()
688 thread->setSuccess(); in ReleaseTexImage()
692 EGLBoolean ReleaseThread(Thread *thread) in ReleaseThread() argument
694 ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread); in ReleaseThread()
696 Surface *previousDraw = thread->getCurrentDrawSurface(); in ReleaseThread()
697 Surface *previousRead = thread->getCurrentReadSurface(); in ReleaseThread()
698 gl::Context *previousContext = thread->getContext(); in ReleaseThread()
699 Display *previousDisplay = thread->getDisplay(); in ReleaseThread()
703 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, previousDisplay->prepareForCall(), in ReleaseThread()
711 thread, in ReleaseThread()
712 previousDisplay->makeCurrent(thread, previousContext, nullptr, nullptr, nullptr), in ReleaseThread()
715 ANGLE_EGL_TRY_RETURN(thread, previousDisplay->releaseThread(), "eglReleaseThread", in ReleaseThread()
719 thread->setSuccess(); in ReleaseThread()
723 EGLBoolean SurfaceAttrib(Thread *thread, in SurfaceAttrib() argument
731 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglSurfaceAttrib", in SurfaceAttrib()
734 ANGLE_EGL_TRY_RETURN(thread, SetSurfaceAttrib(eglSurface, attribute, value), "eglSurfaceAttrib", in SurfaceAttrib()
737 thread->setSuccess(); in SurfaceAttrib()
741 EGLBoolean SwapBuffers(Thread *thread, Display *display, egl::SurfaceID surfaceID) in SwapBuffers() argument
745 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglSwapBuffers", in SwapBuffers()
748 ANGLE_EGL_TRY_RETURN(thread, eglSurface->swap(thread->getContext()), "eglSwapBuffers", in SwapBuffers()
751 thread->setSuccess(); in SwapBuffers()
755 EGLBoolean SwapInterval(Thread *thread, Display *display, EGLint interval) in SwapInterval() argument
757 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglSwapInterval", in SwapInterval()
760 Surface *drawSurface = static_cast<Surface *>(thread->getCurrentDrawSurface()); in SwapInterval()
767 thread->setSuccess(); in SwapInterval()
771 EGLBoolean Terminate(Thread *thread, Display *display) in Terminate() argument
773 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglTerminate", in Terminate()
776 ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread); in Terminate()
778 ANGLE_EGL_TRY_RETURN(thread, display->terminate(thread, Display::TerminateReason::Api), in Terminate()
781 thread->setSuccess(); in Terminate()
785 EGLBoolean WaitClient(Thread *thread) in WaitClient() argument
787 Display *display = thread->getDisplay(); in WaitClient()
796 gl::Context *context = thread->getContext(); in WaitClient()
798 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglWaitClient", in WaitClient()
800 ANGLE_EGL_TRY_RETURN(thread, display->waitClient(context), "eglWaitClient", in WaitClient()
803 thread->setSuccess(); in WaitClient()
807 EGLBoolean WaitGL(Thread *thread) in WaitGL() argument
809 Display *display = thread->getDisplay(); in WaitGL()
817 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglWaitGL", in WaitGL()
822 ANGLE_EGL_TRY_RETURN(thread, display->waitClient(thread->getContext()), "eglWaitGL", in WaitGL()
825 thread->setSuccess(); in WaitGL()
829 EGLBoolean WaitNative(Thread *thread, EGLint engine) in WaitNative() argument
831 Display *display = thread->getDisplay(); in WaitNative()
839 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglWaitNative", in WaitNative()
841 ANGLE_EGL_TRY_RETURN(thread, display->waitNative(thread->getContext(), engine), "eglWaitNative", in WaitNative()
842 GetThreadIfValid(thread), EGL_FALSE); in WaitNative()
844 thread->setSuccess(); in WaitNative()
848 EGLBoolean WaitSync(Thread *thread, Display *display, SyncID syncID, EGLint flags) in WaitSync() argument
850 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglWaitSync", in WaitSync()
852 gl::Context *currentContext = thread->getContext(); in WaitSync()
854 ANGLE_EGL_TRY_RETURN(thread, syncObject->serverWait(display, currentContext, flags), in WaitSync()
857 thread->setSuccess(); in WaitSync()