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 // EGLSyncImpl.h: Defines the rx::EGLSyncImpl class. 8 9 #ifndef LIBANGLE_RENDERER_EGLSYNCIMPL_H_ 10 #define LIBANGLE_RENDERER_EGLSYNCIMPL_H_ 11 12 #include "libANGLE/Error.h" 13 14 #include "common/angleutils.h" 15 16 #include "angle_gl.h" 17 18 namespace egl 19 { 20 class Display; 21 } // namespace egl 22 23 namespace gl 24 { 25 class Context; 26 } // namespace gl 27 28 namespace rx 29 { 30 class EGLSyncImpl : angle::NonCopyable 31 { 32 public: EGLSyncImpl()33 EGLSyncImpl() {} ~EGLSyncImpl()34 virtual ~EGLSyncImpl() {} 35 onDestroy(const egl::Display * display)36 virtual void onDestroy(const egl::Display *display) {} 37 38 virtual egl::Error initialize(const egl::Display *display, 39 const gl::Context *context, 40 EGLenum type) = 0; 41 virtual egl::Error clientWait(const egl::Display *display, 42 const gl::Context *context, 43 EGLint flags, 44 EGLTime timeout, 45 EGLint *outResult) = 0; 46 virtual egl::Error serverWait(const egl::Display *display, 47 const gl::Context *context, 48 EGLint flags) = 0; 49 virtual egl::Error signal(const egl::Display *display, const gl::Context *context, EGLint mode); 50 virtual egl::Error getStatus(const egl::Display *display, EGLint *outStatus) = 0; 51 virtual egl::Error dupNativeFenceFD(const egl::Display *display, EGLint *fdOut) const; 52 }; 53 } // namespace rx 54 55 #endif // LIBANGLE_RENDERER_EGLSYNCIMPL_H_ 56