2
// Copyright 2020 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.
7
// PBufferSurfaceEAGL.h: an implementation of egl::Surface for PBuffers for the EAGL backend,
8
// currently implemented using renderbuffers
10
#ifndef LIBANGLE_RENDERER_GL_EAGL_PBUFFERSURFACEEAGL_H_
11
#define LIBANGLE_RENDERER_GL_EAGL_PBUFFERSURFACEEAGL_H_
13
#include "libANGLE/renderer/gl/SurfaceGL.h"
22
class PbufferSurfaceEAGL : public SurfaceGL
25
PbufferSurfaceEAGL(const egl::SurfaceState &state,
29
~PbufferSurfaceEAGL() override;
31
egl::Error initialize(const egl::Display *display) override;
32
egl::Error makeCurrent(const gl::Context *context) override;
34
egl::Error swap(const gl::Context *context) override;
35
egl::Error postSubBuffer(const gl::Context *context,
39
EGLint height) override;
40
egl::Error querySurfacePointerANGLE(EGLint attribute, void **value) override;
41
egl::Error bindTexImage(const gl::Context *context,
43
EGLint buffer) override;
44
egl::Error releaseTexImage(const gl::Context *context, EGLint buffer) override;
45
void setSwapInterval(EGLint interval) override;
47
EGLint getWidth() const override;
48
EGLint getHeight() const override;
50
EGLint isPostSubBufferSupported() const override;
51
EGLint getSwapBehavior() const override;
53
FramebufferImpl *createDefaultFramebuffer(const gl::Context *context,
54
const gl::FramebufferState &state) override;
60
// TODO(geofflang): Don't store these, they are potentially specific to a single GL context.
61
// http://anglebug.com/2464
62
const FunctionsGL *mFunctions;
63
StateManagerGL *mStateManager;
65
GLuint mColorRenderbuffer;
66
GLuint mDSRenderbuffer;
71
#endif // LIBANGLE_RENDERER_GL_EAGL_PBUFFERSURFACEEAGL_H_