1 // 2 // Copyright 2016 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 // SurfaceOzone.h: Ozone implementation of egl::SurfaceGL 8 9 #ifndef LIBANGLE_RENDERER_GL_EGL_OZONE_SURFACEOZONE_H_ 10 #define LIBANGLE_RENDERER_GL_EGL_OZONE_SURFACEOZONE_H_ 11 12 #include "libANGLE/renderer/gl/SurfaceGL.h" 13 #include "libANGLE/renderer/gl/egl/ozone/DisplayOzone.h" 14 15 namespace rx 16 { 17 18 class SurfaceOzone : public SurfaceGL 19 { 20 public: 21 SurfaceOzone(const egl::SurfaceState &state, DisplayOzone::Buffer *buffer); 22 ~SurfaceOzone() override; 23 24 FramebufferImpl *createDefaultFramebuffer(const gl::Context *context, 25 const gl::FramebufferState &state) override; 26 27 egl::Error initialize(const egl::Display *display) override; 28 egl::Error makeCurrent(const gl::Context *context) override; 29 30 egl::Error swap(const gl::Context *context) override; 31 egl::Error postSubBuffer(const gl::Context *context, 32 EGLint x, 33 EGLint y, 34 EGLint width, 35 EGLint height) override; 36 egl::Error querySurfacePointerANGLE(EGLint attribute, void **value) override; 37 egl::Error bindTexImage(const gl::Context *context, 38 gl::Texture *texture, 39 EGLint buffer) override; 40 egl::Error releaseTexImage(const gl::Context *context, EGLint buffer) override; 41 void setSwapInterval(EGLint interval) override; 42 43 EGLint getWidth() const override; 44 EGLint getHeight() const override; 45 46 EGLint isPostSubBufferSupported() const override; 47 EGLint getSwapBehavior() const override; 48 49 private: 50 DisplayOzone::Buffer *mBuffer; 51 52 // TODO(fjhenigman) Implement swap control. This will be used for that. 53 SwapControlData mSwapControl; 54 }; 55 } // namespace rx 56 57 #endif // LIBANGLE_RENDERER_GL_EGL_OZONE_SURFACEOZONE_H_ 58