• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2015 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 // DisplayGL.h: Defines the class interface for DisplayGL.
8 
9 #ifndef LIBANGLE_RENDERER_GL_DISPLAYGL_H_
10 #define LIBANGLE_RENDERER_GL_DISPLAYGL_H_
11 
12 #include "libANGLE/renderer/DisplayImpl.h"
13 #include "libANGLE/renderer/gl/FunctionsGL.h"
14 
15 namespace egl
16 {
17 class Surface;
18 }
19 
20 namespace rx
21 {
22 
23 class RendererGL;
24 
25 class DisplayGL : public DisplayImpl
26 {
27   public:
28     DisplayGL(const egl::DisplayState &state);
29     ~DisplayGL() override;
30 
31     egl::Error initialize(egl::Display *display) override;
32     void terminate() override;
33 
34     ImageImpl *createImage(const egl::ImageState &state,
35                            const gl::Context *context,
36                            EGLenum target,
37                            const egl::AttributeMap &attribs) override;
38 
39     StreamProducerImpl *createStreamProducerD3DTexture(egl::Stream::ConsumerType consumerType,
40                                                        const egl::AttributeMap &attribs) override;
41 
42     egl::Error makeCurrent(egl::Surface *drawSurface,
43                            egl::Surface *readSurface,
44                            gl::Context *context) override;
45 
46     gl::Version getMaxConformantESVersion() const override;
47 
48   protected:
49     void generateExtensions(egl::DisplayExtensions *outExtensions) const override;
50 
51   private:
52     virtual egl::Error makeCurrentSurfaceless(gl::Context *context);
53 };
54 
55 }  // namespace rx
56 
57 #endif  // LIBANGLE_RENDERER_GL_DISPLAYGL_H_
58