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 SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, 43 EGLenum buftype, 44 EGLClientBuffer clientBuffer, 45 const egl::AttributeMap &attribs) override; 46 47 StreamProducerImpl *createStreamProducerD3DTexture(egl::Stream::ConsumerType consumerType, 48 const egl::AttributeMap &attribs) override; 49 50 ShareGroupImpl *createShareGroup() override; 51 52 egl::Error makeCurrent(egl::Display *display, 53 egl::Surface *drawSurface, 54 egl::Surface *readSurface, 55 gl::Context *context) override; 56 57 gl::Version getMaxConformantESVersion() const override; 58 59 virtual RendererGL *getRenderer() const = 0; 60 61 std::string getRendererDescription() override; 62 std::string getVendorString() override; 63 std::string getVersionString() override; 64 65 protected: 66 void generateExtensions(egl::DisplayExtensions *outExtensions) const override; 67 68 private: 69 virtual egl::Error makeCurrentSurfaceless(gl::Context *context); 70 }; 71 72 } // namespace rx 73 74 #endif // LIBANGLE_RENDERER_GL_DISPLAYGL_H_ 75