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()
156 thread, display->createContext(configuration, sharedGLContext, attributes, &context), in CreateContext()
159 thread->setSuccess(); in CreateContext()
163 EGLImage CreateImage(Thread *thread, in CreateImage() argument
172 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglCreateImage", in CreateImage()
179 thread->setError(error, "eglCreateImage", GetDisplayIfValid(display)); in CreateImage()
183 thread->setSuccess(); in CreateImage()
187 EGLSurface CreatePbufferFromClientBuffer(Thread *thread, in CreatePbufferFromClientBuffer() argument
194 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePbufferFromClientBuffer()
198 ANGLE_EGL_TRY_RETURN(thread, in CreatePbufferFromClientBuffer()
207 EGLSurface CreatePbufferSurface(Thread *thread, in CreatePbufferSurface() argument
212 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePbufferSurface()
216 ANGLE_EGL_TRY_RETURN(thread, display->createPbufferSurface(configuration, attributes, &surface), in CreatePbufferSurface()
222 EGLSurface CreatePixmapSurface(Thread *thread, in CreatePixmapSurface() argument
228 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePixmapSurface()
232 ANGLE_EGL_TRY_RETURN(thread, in CreatePixmapSurface()
236 thread->setSuccess(); in CreatePixmapSurface()
240 EGLSurface CreatePlatformPixmapSurface(Thread *thread, in CreatePlatformPixmapSurface() argument
246 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePlatformPixmapSurface()
252 thread, display->createPixmapSurface(configuration, nativePixmap, attributes, &surface), in CreatePlatformPixmapSurface()
255 thread->setSuccess(); in CreatePlatformPixmapSurface()
259 EGLSurface CreatePlatformWindowSurface(Thread *thread, in CreatePlatformWindowSurface() argument
265 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreatePlatformWindowSurface()
271 thread, display->createWindowSurface(configuration, nativeWindow, attributes, &surface), in CreatePlatformWindowSurface()
277 EGLSync CreateSync(Thread *thread, Display *display, EGLenum type, const AttributeMap &attributes) in CreateSync() argument
279 gl::Context *currentContext = thread->getContext(); in CreateSync()
281 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglCreateSync", in CreateSync()
284 ANGLE_EGL_TRY_RETURN(thread, display->createSync(currentContext, type, attributes, &syncObject), in CreateSync()
287 thread->setSuccess(); in CreateSync()
291 EGLSurface CreateWindowSurface(Thread *thread, in CreateWindowSurface() argument
297 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), in CreateWindowSurface()
302 ANGLE_EGL_TRY_RETURN(thread, in CreateWindowSurface()
309 EGLBoolean DestroyContext(Thread *thread, Display *display, gl::ContextID contextID) in DestroyContext() argument
313 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglDestroyContext", in DestroyContext()
316 ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread); in DestroyContext()
318 ANGLE_EGL_TRY_RETURN(thread, display->destroyContext(thread, context), "eglDestroyContext", in DestroyContext()
320 thread->setSuccess(); in DestroyContext()
324 EGLBoolean DestroyImage(Thread *thread, Display *display, ImageID imageID) in DestroyImage() argument
327 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglDestroyImage", in DestroyImage()
331 thread->setSuccess(); in DestroyImage()
335 EGLBoolean DestroySurface(Thread *thread, Display *display, egl::SurfaceID surfaceID) in DestroySurface() argument
342 // thread, release the surface by passing EGL_NO_SURFACE to eglMakeCurrent(). in DestroySurface()
345 (thread->getCurrentDrawSurface() == eglSurface || in DestroySurface()
346 thread->getCurrentReadSurface() == eglSurface)) in DestroySurface()
350 const gl::Context *currentContext = thread->getContext(); in DestroySurface()
358 MakeCurrent(thread, display, drawSurface, readSurface, contextID); in DestroySurface()
363 MakeCurrent(thread, display, drawSurface, readSurface, in DestroySurface()
368 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglDestroySurface", in DestroySurface()
371 ANGLE_EGL_TRY_RETURN(thread, display->destroySurface(eglSurface), "eglDestroySurface", in DestroySurface()
374 thread->setSuccess(); in DestroySurface()
378 EGLBoolean DestroySync(Thread *thread, Display *display, SyncID syncID) in DestroySync() argument
381 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglDestroySync", in DestroySync()
385 thread->setSuccess(); in DestroySync()
389 EGLBoolean GetConfigAttrib(Thread *thread, in GetConfigAttrib() argument
397 thread->setSuccess(); in GetConfigAttrib()
401 EGLBoolean GetConfigs(Thread *thread, in GetConfigs() argument
409 thread->setSuccess(); in GetConfigs()
413 EGLContext GetCurrentContext(Thread *thread) in GetCurrentContext() argument
415 gl::Context *context = thread->getContext(); in GetCurrentContext()
417 thread->setSuccess(); in GetCurrentContext()
421 EGLDisplay GetCurrentDisplay(Thread *thread) in GetCurrentDisplay() argument
423 thread->setSuccess(); in GetCurrentDisplay()
424 if (thread->getContext() != nullptr) in GetCurrentDisplay()
426 return thread->getContext()->getDisplay(); in GetCurrentDisplay()
431 EGLSurface GetCurrentSurface(Thread *thread, EGLint readdraw) in GetCurrentSurface() argument
434 (readdraw == EGL_READ) ? thread->getCurrentReadSurface() : thread->getCurrentDrawSurface(); in GetCurrentSurface()
435 thread->setSuccess(); in GetCurrentSurface()
446 EGLDisplay GetDisplay(Thread *thread, EGLNativeDisplayType display_id) in GetDisplay() argument
452 EGLint GetError(Thread *thread) in GetError() argument
454 EGLint error = thread->getError(); in GetError()
455 thread->setSuccess(); in GetError()
459 EGLDisplay GetPlatformDisplay(Thread *thread, in GetPlatformDisplay() argument
487 __eglMustCastToProperFunctionPointerType GetProcAddress(Thread *thread, const char *procname) in GetProcAddress() argument
492 thread->setSuccess(); in GetProcAddress()
502 EGLBoolean GetSyncAttrib(Thread *thread, in GetSyncAttrib() argument
509 ANGLE_EGL_TRY_RETURN(thread, GetSyncAttrib(display, syncID, attribute, &valueExt), in GetSyncAttrib()
513 thread->setSuccess(); in GetSyncAttrib()
517 EGLBoolean Initialize(Thread *thread, Display *display, EGLint *major, EGLint *minor) in Initialize() argument
519 ANGLE_EGL_TRY_RETURN(thread, display->initialize(), "eglInitialize", GetDisplayIfValid(display), in Initialize()
531 thread->setSuccess(); in Initialize()
535 EGLBoolean MakeCurrent(Thread *thread, in MakeCurrent() argument
545 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglMakeCurrent", in MakeCurrent()
547 ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread); in MakeCurrent()
549 Surface *previousDraw = thread->getCurrentDrawSurface(); in MakeCurrent()
550 Surface *previousRead = thread->getCurrentReadSurface(); in MakeCurrent()
551 gl::Context *previousContext = thread->getContext(); in MakeCurrent()
557 thread, in MakeCurrent()
558 display->makeCurrent(thread, previousContext, drawSurface, readSurface, context), in MakeCurrent()
562 thread->setSuccess(); in MakeCurrent()
566 EGLenum QueryAPI(Thread *thread) in QueryAPI() argument
568 EGLenum API = thread->getAPI(); in QueryAPI()
570 thread->setSuccess(); in QueryAPI()
574 EGLBoolean QueryContext(Thread *thread, in QueryContext() argument
582 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglQueryContext", in QueryContext()
586 thread->setSuccess(); in QueryContext()
590 const char *QueryString(Thread *thread, Display *display, EGLint name) in QueryString() argument
594 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglQueryString", in QueryString()
629 thread->setSuccess(); in QueryString()
633 EGLBoolean QuerySurface(Thread *thread, in QuerySurface() argument
641 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglQuerySurface", in QuerySurface()
651 context = thread->getContext(); in QuerySurface()
659 ANGLE_EGL_TRY_RETURN(thread, QuerySurfaceAttrib(display, context, eglSurface, attribute, value), in QuerySurface()
662 thread->setSuccess(); in QuerySurface()
666 EGLBoolean ReleaseTexImage(Thread *thread, in ReleaseTexImage() argument
673 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglReleaseTexImage", in ReleaseTexImage()
675 gl::Context *context = thread->getContext(); in ReleaseTexImage()
682 ANGLE_EGL_TRY_RETURN(thread, eglSurface->releaseTexImage(thread->getContext(), buffer), in ReleaseTexImage()
687 thread->setSuccess(); in ReleaseTexImage()
691 EGLBoolean ReleaseThread(Thread *thread) in ReleaseThread() argument
693 ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread); in ReleaseThread()
695 Surface *previousDraw = thread->getCurrentDrawSurface(); in ReleaseThread()
696 Surface *previousRead = thread->getCurrentReadSurface(); in ReleaseThread()
697 gl::Context *previousContext = thread->getContext(); in ReleaseThread()
698 Display *previousDisplay = thread->getDisplay(); in ReleaseThread()
702 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, previousDisplay->prepareForCall(), in ReleaseThread()
710 thread, in ReleaseThread()
711 previousDisplay->makeCurrent(thread, previousContext, nullptr, nullptr, nullptr), in ReleaseThread()
714 ANGLE_EGL_TRY_RETURN(thread, previousDisplay->releaseThread(), "eglReleaseThread", in ReleaseThread()
718 thread->setSuccess(); in ReleaseThread()
722 EGLBoolean SurfaceAttrib(Thread *thread, in SurfaceAttrib() argument
730 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglSurfaceAttrib", in SurfaceAttrib()
733 ANGLE_EGL_TRY_RETURN(thread, SetSurfaceAttrib(eglSurface, attribute, value), "eglSurfaceAttrib", in SurfaceAttrib()
736 thread->setSuccess(); in SurfaceAttrib()
740 EGLBoolean SwapBuffers(Thread *thread, Display *display, egl::SurfaceID surfaceID) in SwapBuffers() argument
744 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglSwapBuffers", in SwapBuffers()
747 ANGLE_EGL_TRY_RETURN(thread, eglSurface->swap(thread->getContext()), "eglSwapBuffers", in SwapBuffers()
750 thread->setSuccess(); in SwapBuffers()
754 EGLBoolean SwapInterval(Thread *thread, Display *display, EGLint interval) in SwapInterval() argument
756 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglSwapInterval", in SwapInterval()
759 Surface *drawSurface = static_cast<Surface *>(thread->getCurrentDrawSurface()); in SwapInterval()
766 thread->setSuccess(); in SwapInterval()
770 EGLBoolean Terminate(Thread *thread, Display *display) in Terminate() argument
772 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglTerminate", in Terminate()
775 ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread); in Terminate()
777 ANGLE_EGL_TRY_RETURN(thread, display->terminate(thread, Display::TerminateReason::Api), in Terminate()
780 thread->setSuccess(); in Terminate()
784 EGLBoolean WaitClient(Thread *thread) in WaitClient() argument
786 Display *display = thread->getDisplay(); in WaitClient()
795 gl::Context *context = thread->getContext(); in WaitClient()
797 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglWaitClient", in WaitClient()
799 ANGLE_EGL_TRY_RETURN(thread, display->waitClient(context), "eglWaitClient", in WaitClient()
802 thread->setSuccess(); in WaitClient()
806 EGLBoolean WaitGL(Thread *thread) in WaitGL() argument
808 Display *display = thread->getDisplay(); in WaitGL()
816 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglWaitGL", in WaitGL()
821 ANGLE_EGL_TRY_RETURN(thread, display->waitClient(thread->getContext()), "eglWaitGL", in WaitGL()
824 thread->setSuccess(); in WaitGL()
828 EGLBoolean WaitNative(Thread *thread, EGLint engine) in WaitNative() argument
830 Display *display = thread->getDisplay(); in WaitNative()
838 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglWaitNative", in WaitNative()
840 ANGLE_EGL_TRY_RETURN(thread, display->waitNative(thread->getContext(), engine), "eglWaitNative", in WaitNative()
841 GetThreadIfValid(thread), EGL_FALSE); in WaitNative()
843 thread->setSuccess(); in WaitNative()
847 EGLBoolean WaitSync(Thread *thread, Display *display, SyncID syncID, EGLint flags) in WaitSync() argument
849 ANGLE_EGL_TRY_PREPARE_FOR_CALL_RETURN(thread, display->prepareForCall(), "eglWaitSync", in WaitSync()
851 gl::Context *currentContext = thread->getContext(); in WaitSync()
853 ANGLE_EGL_TRY_RETURN(thread, syncObject->serverWait(display, currentContext, flags), in WaitSync()
856 thread->setSuccess(); in WaitSync()