tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

EGLSyncImpl.h (1822B)


      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:
     33    EGLSyncImpl() {}
     34    virtual ~EGLSyncImpl() {}
     35 
     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 copyMetalSharedEventANGLE(const egl::Display *display,
     52                                                 void **outEvent) const;
     53    virtual egl::Error dupNativeFenceFD(const egl::Display *display, EGLint *fdOut) const;
     54 };
     55 }  // namespace rx
     56 
     57 #endif  // LIBANGLE_RENDERER_EGLSYNCIMPL_H_