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