1 // 2 // Copyright 2015 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 // SyncGL.h: Defines the class interface for SyncGL. 8 9 #ifndef LIBANGLE_RENDERER_GL_FENCESYNCGL_H_ 10 #define LIBANGLE_RENDERER_GL_FENCESYNCGL_H_ 11 12 #include "libANGLE/renderer/SyncImpl.h" 13 14 namespace rx 15 { 16 class FunctionsGL; 17 18 class SyncGL : public SyncImpl 19 { 20 public: 21 explicit SyncGL(const FunctionsGL *functions); 22 ~SyncGL() override; 23 24 void onDestroy(const gl::Context *context) override; 25 26 angle::Result set(const gl::Context *context, GLenum condition, GLbitfield flags) override; 27 angle::Result clientWait(const gl::Context *context, 28 GLbitfield flags, 29 GLuint64 timeout, 30 GLenum *outResult) override; 31 angle::Result serverWait(const gl::Context *context, 32 GLbitfield flags, 33 GLuint64 timeout) override; 34 angle::Result getStatus(const gl::Context *context, GLint *outResult) override; 35 36 private: 37 const FunctionsGL *mFunctions; 38 GLsync mSyncObject; 39 }; 40 } // namespace rx 41 42 #endif // LIBANGLE_RENDERER_GL_FENCESYNCGL_H_ 43