• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // SurfaceNULL.h:
7 //    Defines the class interface for SurfaceNULL, implementing SurfaceImpl.
8 //
9 
10 #ifndef LIBANGLE_RENDERER_NULL_SURFACENULL_H_
11 #define LIBANGLE_RENDERER_NULL_SURFACENULL_H_
12 
13 #include "libANGLE/renderer/SurfaceImpl.h"
14 
15 namespace rx
16 {
17 
18 class SurfaceNULL : public SurfaceImpl
19 {
20   public:
21     SurfaceNULL(const egl::SurfaceState &surfaceState);
22     ~SurfaceNULL() override;
23 
24     egl::Error initialize(const egl::Display *display) override;
25     FramebufferImpl *createDefaultFramebuffer(const gl::Context *context,
26                                               const gl::FramebufferState &state) override;
27     egl::Error swap(const gl::Context *context) override;
28     egl::Error postSubBuffer(const gl::Context *context,
29                              EGLint x,
30                              EGLint y,
31                              EGLint width,
32                              EGLint height) override;
33     egl::Error querySurfacePointerANGLE(EGLint attribute, void **value) override;
34     egl::Error bindTexImage(const gl::Context *context,
35                             gl::Texture *texture,
36                             EGLint buffer) override;
37     egl::Error releaseTexImage(const gl::Context *context, EGLint buffer) override;
38     egl::Error getSyncValues(EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc) override;
39     egl::Error getMscRate(EGLint *numerator, EGLint *denominator) override;
40     void setSwapInterval(EGLint interval) override;
41 
42     // width and height can change with client window resizing
43     EGLint getWidth() const override;
44     EGLint getHeight() const override;
45 
46     EGLint isPostSubBufferSupported() const override;
47     EGLint getSwapBehavior() const override;
48 
49     angle::Result initializeContents(const gl::Context *context,
50                                      const gl::ImageIndex &imageIndex) override;
51 };
52 
53 }  // namespace rx
54 
55 #endif  // LIBANGLE_RENDERER_NULL_SURFACENULL_H_
56