1 // 2 // Copyright 2019 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 7 // SyncEGL.h: Defines the rx::SyncEGL class, the EGL implementation of EGL sync objects. 8 9 #ifndef LIBANGLE_RENDERER_GL_EGL_SYNCEGL_H_ 10 #define LIBANGLE_RENDERER_GL_EGL_SYNCEGL_H_ 11 12 #include "libANGLE/renderer/EGLSyncImpl.h" 13 14 namespace egl 15 { 16 class AttributeMap; 17 } 18 19 namespace rx 20 { 21 22 class FunctionsEGL; 23 24 class SyncEGL final : public EGLSyncImpl 25 { 26 public: 27 SyncEGL(const FunctionsEGL *egl); 28 ~SyncEGL() override; 29 30 void onDestroy(const egl::Display *display) override; 31 32 egl::Error initialize(const egl::Display *display, 33 const gl::Context *context, 34 EGLenum type, 35 const egl::AttributeMap &attribs) override; 36 egl::Error clientWait(const egl::Display *display, 37 const gl::Context *context, 38 EGLint flags, 39 EGLTime timeout, 40 EGLint *outResult) override; 41 egl::Error serverWait(const egl::Display *display, 42 const gl::Context *context, 43 EGLint flags) override; 44 egl::Error getStatus(const egl::Display *display, EGLint *outStatus) override; 45 46 egl::Error dupNativeFenceFD(const egl::Display *display, EGLint *result) const override; 47 48 private: 49 const FunctionsEGL *mEGL; 50 51 EGLSync mSync; 52 }; 53 54 } // namespace rx 55 56 #endif // LIBANGLE_RENDERER_GL_EGL_IMAGEEGL_H_ 57