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/ShareGroupImpl.h" 14 #include "libANGLE/renderer/gl/FunctionsGL.h" 15 16 namespace egl 17 { 18 class Surface; 19 } 20 21 namespace rx 22 { 23 24 class ShareGroupGL : public ShareGroupImpl 25 { 26 public: ShareGroupGL(const egl::ShareGroupState & state)27 ShareGroupGL(const egl::ShareGroupState &state) : ShareGroupImpl(state) {} 28 }; 29 30 class RendererGL; 31 32 class DisplayGL : public DisplayImpl 33 { 34 public: 35 DisplayGL(const egl::DisplayState &state); 36 ~DisplayGL() override; 37 38 egl::Error initialize(egl::Display *display) override; 39 void terminate() override; 40 41 ImageImpl *createImage(const egl::ImageState &state, 42 const gl::Context *context, 43 EGLenum target, 44 const egl::AttributeMap &attribs) override; 45 46 SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, 47 EGLenum buftype, 48 EGLClientBuffer clientBuffer, 49 const egl::AttributeMap &attribs) override; 50 51 StreamProducerImpl *createStreamProducerD3DTexture(egl::Stream::ConsumerType consumerType, 52 const egl::AttributeMap &attribs) override; 53 54 ShareGroupImpl *createShareGroup(const egl::ShareGroupState &state) override; 55 56 egl::Error makeCurrent(egl::Display *display, 57 egl::Surface *drawSurface, 58 egl::Surface *readSurface, 59 gl::Context *context) override; 60 61 gl::Version getMaxConformantESVersion() const override; 62 63 virtual RendererGL *getRenderer() const = 0; 64 65 std::string getRendererDescription() override; 66 std::string getVendorString() override; 67 std::string getVersionString(bool includeFullVersion) override; 68 69 protected: 70 void generateExtensions(egl::DisplayExtensions *outExtensions) const override; 71 72 private: 73 virtual egl::Error makeCurrentSurfaceless(gl::Context *context); 74 }; 75 76 } // namespace rx 77 78 #endif // LIBANGLE_RENDERER_GL_DISPLAYGL_H_ 79