Path: blob/main_old/src/libGLESv2/egl_stubs.cpp
1693 views
//1// Copyright 2020 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//5// egl_stubs.cpp: Stubs for EGL entry points.6//78#include "libGLESv2/egl_stubs_autogen.h"910#include "common/angle_version.h"11#include "libANGLE/Context.h"12#include "libANGLE/Display.h"13#include "libANGLE/EGLSync.h"14#include "libANGLE/Surface.h"15#include "libANGLE/Thread.h"16#include "libANGLE/queryutils.h"17#include "libANGLE/validationEGL.h"18#include "libGLESv2/global_state.h"19#include "libGLESv2/proc_table_egl.h"2021namespace egl22{23namespace24{2526bool CompareProc(const ProcEntry &a, const char *b)27{28return strcmp(a.first, b) < 0;29}3031void ClipConfigs(const std::vector<const Config *> &filteredConfigs,32EGLConfig *outputConfigs,33EGLint configSize,34EGLint *numConfigs)35{36EGLint resultSize = static_cast<EGLint>(filteredConfigs.size());37if (outputConfigs)38{39resultSize = std::max(std::min(resultSize, configSize), 0);40for (EGLint i = 0; i < resultSize; i++)41{42outputConfigs[i] = const_cast<Config *>(filteredConfigs[i]);43}44}45*numConfigs = resultSize;46}47} // anonymous namespace4849EGLBoolean BindAPI(Thread *thread, EGLenum api)50{51thread->setAPI(api);5253thread->setSuccess();54return EGL_TRUE;55}5657EGLBoolean BindTexImage(Thread *thread, Display *display, Surface *eglSurface, EGLint buffer)58{59ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglBindTexImage",60GetDisplayIfValid(display), EGL_FALSE);6162gl::Context *context = thread->getContext();63if (context)64{65gl::TextureType type =66egl_gl::EGLTextureTargetToTextureType(eglSurface->getTextureTarget());67gl::Texture *textureObject = context->getTextureByType(type);68ANGLE_EGL_TRY_RETURN(thread, eglSurface->bindTexImage(context, textureObject, buffer),69"eglBindTexImage", GetSurfaceIfValid(display, eglSurface), EGL_FALSE);70}7172thread->setSuccess();73return EGL_TRUE;74}7576EGLBoolean ChooseConfig(Thread *thread,77Display *display,78const AttributeMap &attribMap,79EGLConfig *configs,80EGLint config_size,81EGLint *num_config)82{83ClipConfigs(display->chooseConfig(attribMap), configs, config_size, num_config);8485thread->setSuccess();86return EGL_TRUE;87}8889EGLint ClientWaitSync(Thread *thread,90Display *display,91Sync *syncObject,92EGLint flags,93EGLTime timeout)94{95ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglClientWaitSync",96GetDisplayIfValid(display), EGL_FALSE);97gl::Context *currentContext = thread->getContext();98EGLint syncStatus = EGL_FALSE;99ANGLE_EGL_TRY_RETURN(100thread, syncObject->clientWait(display, currentContext, flags, timeout, &syncStatus),101"eglClientWaitSync", GetSyncIfValid(display, syncObject), EGL_FALSE);102103thread->setSuccess();104return syncStatus;105}106107EGLBoolean CopyBuffers(Thread *thread,108Display *display,109Surface *eglSurface,110EGLNativePixmapType target)111{112ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCopyBuffers",113GetDisplayIfValid(display), EGL_FALSE);114UNIMPLEMENTED(); // FIXME115116thread->setSuccess();117return 0;118}119120EGLContext CreateContext(Thread *thread,121Display *display,122Config *configuration,123gl::Context *sharedGLContext,124const AttributeMap &attributes)125{126ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateContext",127GetDisplayIfValid(display), EGL_NO_CONTEXT);128gl::Context *context = nullptr;129ANGLE_EGL_TRY_RETURN(thread,130display->createContext(configuration, sharedGLContext, thread->getAPI(),131attributes, &context),132"eglCreateContext", GetDisplayIfValid(display), EGL_NO_CONTEXT);133134thread->setSuccess();135return static_cast<EGLContext>(context);136}137138EGLImage CreateImage(Thread *thread,139Display *display,140gl::Context *context,141EGLenum target,142EGLClientBuffer buffer,143const AttributeMap &attributes)144{145ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateImage",146GetDisplayIfValid(display), EGL_FALSE);147148Image *image = nullptr;149Error error = display->createImage(context, target, buffer, attributes, &image);150if (error.isError())151{152thread->setError(error, "eglCreateImage", GetDisplayIfValid(display));153return EGL_NO_IMAGE;154}155156thread->setSuccess();157return static_cast<EGLImage>(image);158}159160EGLSurface CreatePbufferFromClientBuffer(Thread *thread,161Display *display,162EGLenum buftype,163EGLClientBuffer buffer,164Config *configuration,165const AttributeMap &attributes)166{167ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePbufferFromClientBuffer",168GetDisplayIfValid(display), EGL_NO_SURFACE);169Surface *surface = nullptr;170ANGLE_EGL_TRY_RETURN(thread,171display->createPbufferFromClientBuffer(configuration, buftype, buffer,172attributes, &surface),173"eglCreatePbufferFromClientBuffer", GetDisplayIfValid(display),174EGL_NO_SURFACE);175176return static_cast<EGLSurface>(surface);177}178179EGLSurface CreatePbufferSurface(Thread *thread,180Display *display,181Config *configuration,182const AttributeMap &attributes)183{184ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePbufferSurface",185GetDisplayIfValid(display), EGL_NO_SURFACE);186Surface *surface = nullptr;187ANGLE_EGL_TRY_RETURN(thread, display->createPbufferSurface(configuration, attributes, &surface),188"eglCreatePbufferSurface", GetDisplayIfValid(display), EGL_NO_SURFACE);189190return static_cast<EGLSurface>(surface);191}192193EGLSurface CreatePixmapSurface(Thread *thread,194Display *display,195Config *configuration,196EGLNativePixmapType pixmap,197const AttributeMap &attributes)198{199ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePixmapSurface",200GetDisplayIfValid(display), EGL_NO_SURFACE);201Surface *surface = nullptr;202ANGLE_EGL_TRY_RETURN(thread,203display->createPixmapSurface(configuration, pixmap, attributes, &surface),204"eglCreatePixmapSurface", GetDisplayIfValid(display), EGL_NO_SURFACE);205206thread->setSuccess();207return static_cast<EGLSurface>(surface);208}209210EGLSurface CreatePlatformPixmapSurface(Thread *thread,211Display *display,212Config *configuration,213void *pixmap,214const AttributeMap &attributes)215{216ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePlatformPixmapSurface",217GetDisplayIfValid(display), EGL_NO_SURFACE);218Surface *surface = nullptr;219EGLNativePixmapType nativePixmap = reinterpret_cast<EGLNativePixmapType>(pixmap);220ANGLE_EGL_TRY_RETURN(221thread, display->createPixmapSurface(configuration, nativePixmap, attributes, &surface),222"eglCreatePlatformPixmapSurface", GetDisplayIfValid(display), EGL_NO_SURFACE);223224thread->setSuccess();225return static_cast<EGLSurface>(surface);226}227228EGLSurface CreatePlatformWindowSurface(Thread *thread,229Display *display,230Config *configuration,231void *win,232const AttributeMap &attributes)233{234ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreatePlatformWindowSurface",235GetDisplayIfValid(display), EGL_NO_SURFACE);236Surface *surface = nullptr;237EGLNativeWindowType nativeWindow = reinterpret_cast<EGLNativeWindowType>(win);238ANGLE_EGL_TRY_RETURN(239thread, display->createWindowSurface(configuration, nativeWindow, attributes, &surface),240"eglPlatformCreateWindowSurface", GetDisplayIfValid(display), EGL_NO_SURFACE);241242return static_cast<EGLSurface>(surface);243}244245EGLSync CreateSync(Thread *thread, Display *display, EGLenum type, const AttributeMap &attributes)246{247gl::Context *currentContext = thread->getContext();248249ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateSync",250GetDisplayIfValid(display), EGL_FALSE);251Sync *syncObject = nullptr;252ANGLE_EGL_TRY_RETURN(thread, display->createSync(currentContext, type, attributes, &syncObject),253"eglCreateSync", GetDisplayIfValid(display), EGL_NO_SYNC);254255thread->setSuccess();256return static_cast<EGLSync>(syncObject);257}258259EGLSurface CreateWindowSurface(Thread *thread,260Display *display,261Config *configuration,262EGLNativeWindowType win,263const AttributeMap &attributes)264{265ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglCreateWindowSurface",266GetDisplayIfValid(display), EGL_NO_SURFACE);267268Surface *surface = nullptr;269ANGLE_EGL_TRY_RETURN(thread,270display->createWindowSurface(configuration, win, attributes, &surface),271"eglCreateWindowSurface", GetDisplayIfValid(display), EGL_NO_SURFACE);272273return static_cast<EGLSurface>(surface);274}275276EGLBoolean DestroyContext(Thread *thread, Display *display, gl::Context *context)277{278ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroyContext",279GetDisplayIfValid(display), EGL_FALSE);280281ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread);282283ANGLE_EGL_TRY_RETURN(thread, display->destroyContext(thread, context), "eglDestroyContext",284GetContextIfValid(display, context), EGL_FALSE);285thread->setSuccess();286return EGL_TRUE;287}288289EGLBoolean DestroyImage(Thread *thread, Display *display, Image *img)290{291ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroyImage",292GetDisplayIfValid(display), EGL_FALSE);293display->destroyImage(img);294295thread->setSuccess();296return EGL_TRUE;297}298299EGLBoolean DestroySurface(Thread *thread, Display *display, Surface *eglSurface)300{301ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroySurface",302GetDisplayIfValid(display), EGL_FALSE);303ANGLE_EGL_TRY_RETURN(thread, display->destroySurface(eglSurface), "eglDestroySurface",304GetSurfaceIfValid(display, eglSurface), EGL_FALSE);305306thread->setSuccess();307return EGL_TRUE;308}309310EGLBoolean DestroySync(Thread *thread, Display *display, Sync *syncObject)311{312ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglDestroySync",313GetDisplayIfValid(display), EGL_FALSE);314display->destroySync(syncObject);315316thread->setSuccess();317return EGL_TRUE;318}319320EGLBoolean GetConfigAttrib(Thread *thread,321Display *display,322Config *configuration,323EGLint attribute,324EGLint *value)325{326QueryConfigAttrib(configuration, attribute, value);327328thread->setSuccess();329return EGL_TRUE;330}331332EGLBoolean GetConfigs(Thread *thread,333Display *display,334EGLConfig *configs,335EGLint config_size,336EGLint *num_config)337{338ClipConfigs(display->getConfigs(AttributeMap()), configs, config_size, num_config);339340thread->setSuccess();341return EGL_TRUE;342}343344EGLContext GetCurrentContext(Thread *thread)345{346gl::Context *context = thread->getContext();347348thread->setSuccess();349return static_cast<EGLContext>(context);350}351352EGLDisplay GetCurrentDisplay(Thread *thread)353{354thread->setSuccess();355if (thread->getContext() != nullptr)356{357return thread->getContext()->getDisplay();358}359return EGL_NO_DISPLAY;360}361362EGLSurface GetCurrentSurface(Thread *thread, EGLint readdraw)363{364if (readdraw == EGL_READ)365{366thread->setSuccess();367return thread->getCurrentReadSurface();368}369else if (readdraw == EGL_DRAW)370{371thread->setSuccess();372return thread->getCurrentDrawSurface();373}374else375{376thread->setError(EglBadParameter(), "eglGetCurrentSurface", nullptr);377return EGL_NO_SURFACE;378}379}380381EGLDisplay GetDisplay(Thread *thread, EGLNativeDisplayType display_id)382{383return Display::GetDisplayFromNativeDisplay(display_id, AttributeMap());384}385386EGLint GetError(Thread *thread)387{388EGLint error = thread->getError();389thread->setSuccess();390return error;391}392393EGLDisplay GetPlatformDisplay(Thread *thread,394EGLenum platform,395void *native_display,396const AttributeMap &attribMap)397{398if (platform == EGL_PLATFORM_ANGLE_ANGLE)399{400return Display::GetDisplayFromNativeDisplay(401gl::bitCast<EGLNativeDisplayType>(native_display), attribMap);402}403else if (platform == EGL_PLATFORM_DEVICE_EXT)404{405Device *eglDevice = static_cast<Device *>(native_display);406return Display::GetDisplayFromDevice(eglDevice, attribMap);407}408else409{410UNREACHABLE();411return EGL_NO_DISPLAY;412}413}414415__eglMustCastToProperFunctionPointerType GetProcAddress(Thread *thread, const char *procname)416{417const ProcEntry *entry =418std::lower_bound(&g_procTable[0], &g_procTable[g_numProcs], procname, CompareProc);419420thread->setSuccess();421422if (entry == &g_procTable[g_numProcs] || strcmp(entry->first, procname) != 0)423{424return nullptr;425}426427return entry->second;428}429430EGLBoolean GetSyncAttrib(Thread *thread,431Display *display,432Sync *syncObject,433EGLint attribute,434EGLAttrib *value)435{436EGLint valueExt;437ANGLE_EGL_TRY_RETURN(thread, GetSyncAttrib(display, syncObject, attribute, &valueExt),438"eglGetSyncAttrib", GetSyncIfValid(display, syncObject), EGL_FALSE);439*value = valueExt;440441thread->setSuccess();442return EGL_TRUE;443}444445EGLBoolean Initialize(Thread *thread, Display *display, EGLint *major, EGLint *minor)446{447ANGLE_EGL_TRY_RETURN(thread, display->initialize(), "eglInitialize", GetDisplayIfValid(display),448EGL_FALSE);449450if (major)451*major = 1;452if (minor)453*minor = 5;454455thread->setSuccess();456return EGL_TRUE;457}458459EGLBoolean MakeCurrent(Thread *thread,460Display *display,461Surface *drawSurface,462Surface *readSurface,463gl::Context *context)464{465ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglMakeCurrent",466GetDisplayIfValid(display), EGL_FALSE);467ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread);468469Surface *previousDraw = thread->getCurrentDrawSurface();470Surface *previousRead = thread->getCurrentReadSurface();471gl::Context *previousContext = thread->getContext();472473// Only call makeCurrent if the context or surfaces have changed.474if (previousDraw != drawSurface || previousRead != readSurface || previousContext != context)475{476ANGLE_EGL_TRY_RETURN(477thread,478display->makeCurrent(thread, previousContext, drawSurface, readSurface, context),479"eglMakeCurrent", GetContextIfValid(display, context), EGL_FALSE);480}481482thread->setSuccess();483return EGL_TRUE;484}485486EGLenum QueryAPI(Thread *thread)487{488EGLenum API = thread->getAPI();489490thread->setSuccess();491return API;492}493494EGLBoolean QueryContext(Thread *thread,495Display *display,496gl::Context *context,497EGLint attribute,498EGLint *value)499{500ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryContext",501GetDisplayIfValid(display), EGL_FALSE);502QueryContextAttrib(context, attribute, value);503504thread->setSuccess();505return EGL_TRUE;506}507508const char *QueryString(Thread *thread, Display *display, EGLint name)509{510if (display)511{512ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQueryString",513GetDisplayIfValid(display), nullptr);514}515516const char *result = nullptr;517switch (name)518{519case EGL_CLIENT_APIS:520result = "OpenGL_ES";521break;522case EGL_EXTENSIONS:523if (display == EGL_NO_DISPLAY)524{525result = Display::GetClientExtensionString().c_str();526}527else528{529result = display->getExtensionString().c_str();530}531break;532case EGL_VENDOR:533result = display->getVendorString().c_str();534break;535case EGL_VERSION:536result = "1.5 (ANGLE " ANGLE_VERSION_STRING ")";537break;538default:539UNREACHABLE();540break;541}542543thread->setSuccess();544return result;545}546547EGLBoolean QuerySurface(Thread *thread,548Display *display,549Surface *eglSurface,550EGLint attribute,551EGLint *value)552{553ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQuerySurface",554GetDisplayIfValid(display), EGL_FALSE);555ANGLE_EGL_TRY_RETURN(556thread, QuerySurfaceAttrib(display, thread->getContext(), eglSurface, attribute, value),557"eglQuerySurface", GetSurfaceIfValid(display, eglSurface), EGL_FALSE);558559thread->setSuccess();560return EGL_TRUE;561}562563EGLBoolean ReleaseTexImage(Thread *thread, Display *display, Surface *eglSurface, EGLint buffer)564{565ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglReleaseTexImage",566GetDisplayIfValid(display), EGL_FALSE);567gl::Texture *texture = eglSurface->getBoundTexture();568569if (texture)570{571ANGLE_EGL_TRY_RETURN(thread, eglSurface->releaseTexImage(thread->getContext(), buffer),572"eglReleaseTexImage", GetSurfaceIfValid(display, eglSurface),573EGL_FALSE);574}575576thread->setSuccess();577return EGL_TRUE;578}579580EGLBoolean ReleaseThread(Thread *thread)581{582ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread);583584Surface *previousDraw = thread->getCurrentDrawSurface();585Surface *previousRead = thread->getCurrentReadSurface();586gl::Context *previousContext = thread->getContext();587Display *previousDisplay = thread->getDisplay();588589if (previousDisplay != EGL_NO_DISPLAY)590{591ANGLE_EGL_TRY_RETURN(thread, previousDisplay->prepareForCall(), "eglReleaseThread",592GetDisplayIfValid(previousDisplay), EGL_FALSE);593// Only call makeCurrent if the context or surfaces have changed.594if (previousDraw != EGL_NO_SURFACE || previousRead != EGL_NO_SURFACE ||595previousContext != EGL_NO_CONTEXT)596{597ANGLE_EGL_TRY_RETURN(598thread,599previousDisplay->makeCurrent(thread, previousContext, nullptr, nullptr, nullptr),600"eglReleaseThread", nullptr, EGL_FALSE);601}602ANGLE_EGL_TRY_RETURN(thread, previousDisplay->releaseThread(), "eglReleaseThread",603GetDisplayIfValid(previousDisplay), EGL_FALSE);604}605606thread->setSuccess();607return EGL_TRUE;608}609610EGLBoolean SurfaceAttrib(Thread *thread,611Display *display,612Surface *eglSurface,613EGLint attribute,614EGLint value)615{616ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglSurfaceAttrib",617GetDisplayIfValid(display), EGL_FALSE);618SetSurfaceAttrib(eglSurface, attribute, value);619620thread->setSuccess();621return EGL_TRUE;622}623624EGLBoolean SwapBuffers(Thread *thread, Display *display, Surface *eglSurface)625{626ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglSwapBuffers",627GetDisplayIfValid(display), EGL_FALSE);628629ANGLE_EGL_TRY_RETURN(thread, eglSurface->swap(thread->getContext()), "eglSwapBuffers",630GetSurfaceIfValid(display, eglSurface), EGL_FALSE);631632thread->setSuccess();633return EGL_TRUE;634}635636EGLBoolean SwapInterval(Thread *thread, Display *display, EGLint interval)637{638ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglSwapInterval",639GetDisplayIfValid(display), EGL_FALSE);640641Surface *drawSurface = static_cast<Surface *>(thread->getCurrentDrawSurface());642const Config *surfaceConfig = drawSurface->getConfig();643EGLint clampedInterval = std::min(std::max(interval, surfaceConfig->minSwapInterval),644surfaceConfig->maxSwapInterval);645646drawSurface->setSwapInterval(clampedInterval);647648thread->setSuccess();649return EGL_TRUE;650}651652EGLBoolean Terminate(Thread *thread, Display *display)653{654ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglTerminate",655GetDisplayIfValid(display), EGL_FALSE);656657ScopedSyncCurrentContextFromThread scopedSyncCurrent(thread);658659ANGLE_EGL_TRY_RETURN(thread, display->terminate(thread), "eglTerminate",660GetDisplayIfValid(display), EGL_FALSE);661662thread->setSuccess();663return EGL_TRUE;664}665666EGLBoolean WaitClient(Thread *thread)667{668Display *display = thread->getDisplay();669if (display == nullptr)670{671// EGL spec says this about eglWaitClient -672// If there is no current context for the current rendering API,673// the function has no effect but still returns EGL_TRUE.674return EGL_TRUE;675}676677gl::Context *context = thread->getContext();678679ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglWaitClient",680GetDisplayIfValid(display), EGL_FALSE);681ANGLE_EGL_TRY_RETURN(thread, display->waitClient(context), "eglWaitClient",682GetContextIfValid(display, context), EGL_FALSE);683684thread->setSuccess();685return EGL_TRUE;686}687688EGLBoolean WaitGL(Thread *thread)689{690Display *display = thread->getDisplay();691if (display == nullptr)692{693// EGL spec says this about eglWaitGL -694// eglWaitGL is ignored if there is no current EGL rendering context for OpenGL ES.695return EGL_TRUE;696}697698ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglWaitGL", GetDisplayIfValid(display),699EGL_FALSE);700701// eglWaitGL like calling eglWaitClient with the OpenGL ES API bound. Since we only implement702// OpenGL ES we can do the call directly.703ANGLE_EGL_TRY_RETURN(thread, display->waitClient(thread->getContext()), "eglWaitGL",704GetDisplayIfValid(display), EGL_FALSE);705706thread->setSuccess();707return EGL_TRUE;708}709710EGLBoolean WaitNative(Thread *thread, EGLint engine)711{712Display *display = thread->getDisplay();713if (display == nullptr)714{715// EGL spec says this about eglWaitNative -716// eglWaitNative is ignored if there is no current EGL rendering context.717return EGL_TRUE;718}719720ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglWaitNative",721GetDisplayIfValid(display), EGL_FALSE);722ANGLE_EGL_TRY_RETURN(thread, display->waitNative(thread->getContext(), engine), "eglWaitNative",723GetThreadIfValid(thread), EGL_FALSE);724725thread->setSuccess();726return EGL_TRUE;727}728729EGLBoolean WaitSync(Thread *thread, Display *display, Sync *syncObject, EGLint flags)730{731ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglWaitSync",732GetDisplayIfValid(display), EGL_FALSE);733gl::Context *currentContext = thread->getContext();734ANGLE_EGL_TRY_RETURN(thread, syncObject->serverWait(display, currentContext, flags),735"eglWaitSync", GetSyncIfValid(display, syncObject), EGL_FALSE);736737thread->setSuccess();738return EGL_TRUE;739}740} // namespace egl741742743