• 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 class ShareGroupGL : public ShareGroupImpl
23 {};
24 
25 class RendererGL;
26 
27 class DisplayGL : public DisplayImpl
28 {
29   public:
30     DisplayGL(const egl::DisplayState &state);
31     ~DisplayGL() override;
32 
33     egl::Error initialize(egl::Display *display) override;
34     void terminate() override;
35 
36     ImageImpl *createImage(const egl::ImageState &state,
37                            const gl::Context *context,
38                            EGLenum target,
39                            const egl::AttributeMap &attribs) override;
40 
41     StreamProducerImpl *createStreamProducerD3DTexture(egl::Stream::ConsumerType consumerType,
42                                                        const egl::AttributeMap &attribs) override;
43 
44     ShareGroupImpl *createShareGroup() override;
45 
46     egl::Error makeCurrent(egl::Surface *drawSurface,
47                            egl::Surface *readSurface,
48                            gl::Context *context) override;
49 
50     gl::Version getMaxConformantESVersion() const override;
51 
52   protected:
53     void generateExtensions(egl::DisplayExtensions *outExtensions) const override;
54 
55   private:
56     virtual egl::Error makeCurrentSurfaceless(gl::Context *context);
57 };
58 
59 }  // namespace rx
60 
61 #endif  // LIBANGLE_RENDERER_GL_DISPLAYGL_H_
62