1*8975f5c5SAndroid Build Coastguard Worker // 2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2015 The ANGLE Project Authors. All rights reserved. 3*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 4*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file. 5*8975f5c5SAndroid Build Coastguard Worker // 6*8975f5c5SAndroid Build Coastguard Worker 7*8975f5c5SAndroid Build Coastguard Worker // DisplayGL.h: Defines the class interface for DisplayGL. 8*8975f5c5SAndroid Build Coastguard Worker 9*8975f5c5SAndroid Build Coastguard Worker #ifndef LIBANGLE_RENDERER_GL_DISPLAYGL_H_ 10*8975f5c5SAndroid Build Coastguard Worker #define LIBANGLE_RENDERER_GL_DISPLAYGL_H_ 11*8975f5c5SAndroid Build Coastguard Worker 12*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/DisplayImpl.h" 13*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/ShareGroupImpl.h" 14*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/gl/FunctionsGL.h" 15*8975f5c5SAndroid Build Coastguard Worker 16*8975f5c5SAndroid Build Coastguard Worker namespace egl 17*8975f5c5SAndroid Build Coastguard Worker { 18*8975f5c5SAndroid Build Coastguard Worker class Surface; 19*8975f5c5SAndroid Build Coastguard Worker } 20*8975f5c5SAndroid Build Coastguard Worker 21*8975f5c5SAndroid Build Coastguard Worker namespace rx 22*8975f5c5SAndroid Build Coastguard Worker { 23*8975f5c5SAndroid Build Coastguard Worker 24*8975f5c5SAndroid Build Coastguard Worker class ShareGroupGL : public ShareGroupImpl 25*8975f5c5SAndroid Build Coastguard Worker { 26*8975f5c5SAndroid Build Coastguard Worker public: ShareGroupGL(const egl::ShareGroupState & state)27*8975f5c5SAndroid Build Coastguard Worker ShareGroupGL(const egl::ShareGroupState &state) : ShareGroupImpl(state) {} 28*8975f5c5SAndroid Build Coastguard Worker }; 29*8975f5c5SAndroid Build Coastguard Worker 30*8975f5c5SAndroid Build Coastguard Worker class RendererGL; 31*8975f5c5SAndroid Build Coastguard Worker 32*8975f5c5SAndroid Build Coastguard Worker class DisplayGL : public DisplayImpl 33*8975f5c5SAndroid Build Coastguard Worker { 34*8975f5c5SAndroid Build Coastguard Worker public: 35*8975f5c5SAndroid Build Coastguard Worker DisplayGL(const egl::DisplayState &state); 36*8975f5c5SAndroid Build Coastguard Worker ~DisplayGL() override; 37*8975f5c5SAndroid Build Coastguard Worker 38*8975f5c5SAndroid Build Coastguard Worker egl::Error initialize(egl::Display *display) override; 39*8975f5c5SAndroid Build Coastguard Worker void terminate() override; 40*8975f5c5SAndroid Build Coastguard Worker 41*8975f5c5SAndroid Build Coastguard Worker ImageImpl *createImage(const egl::ImageState &state, 42*8975f5c5SAndroid Build Coastguard Worker const gl::Context *context, 43*8975f5c5SAndroid Build Coastguard Worker EGLenum target, 44*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 45*8975f5c5SAndroid Build Coastguard Worker 46*8975f5c5SAndroid Build Coastguard Worker SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, 47*8975f5c5SAndroid Build Coastguard Worker EGLenum buftype, 48*8975f5c5SAndroid Build Coastguard Worker EGLClientBuffer clientBuffer, 49*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 50*8975f5c5SAndroid Build Coastguard Worker 51*8975f5c5SAndroid Build Coastguard Worker StreamProducerImpl *createStreamProducerD3DTexture(egl::Stream::ConsumerType consumerType, 52*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 53*8975f5c5SAndroid Build Coastguard Worker 54*8975f5c5SAndroid Build Coastguard Worker ShareGroupImpl *createShareGroup(const egl::ShareGroupState &state) override; 55*8975f5c5SAndroid Build Coastguard Worker 56*8975f5c5SAndroid Build Coastguard Worker egl::Error makeCurrent(egl::Display *display, 57*8975f5c5SAndroid Build Coastguard Worker egl::Surface *drawSurface, 58*8975f5c5SAndroid Build Coastguard Worker egl::Surface *readSurface, 59*8975f5c5SAndroid Build Coastguard Worker gl::Context *context) override; 60*8975f5c5SAndroid Build Coastguard Worker 61*8975f5c5SAndroid Build Coastguard Worker gl::Version getMaxConformantESVersion() const override; 62*8975f5c5SAndroid Build Coastguard Worker 63*8975f5c5SAndroid Build Coastguard Worker virtual RendererGL *getRenderer() const = 0; 64*8975f5c5SAndroid Build Coastguard Worker 65*8975f5c5SAndroid Build Coastguard Worker std::string getRendererDescription() override; 66*8975f5c5SAndroid Build Coastguard Worker std::string getVendorString() override; 67*8975f5c5SAndroid Build Coastguard Worker std::string getVersionString(bool includeFullVersion) override; 68*8975f5c5SAndroid Build Coastguard Worker 69*8975f5c5SAndroid Build Coastguard Worker protected: 70*8975f5c5SAndroid Build Coastguard Worker void generateExtensions(egl::DisplayExtensions *outExtensions) const override; 71*8975f5c5SAndroid Build Coastguard Worker 72*8975f5c5SAndroid Build Coastguard Worker private: 73*8975f5c5SAndroid Build Coastguard Worker virtual egl::Error makeCurrentSurfaceless(gl::Context *context); 74*8975f5c5SAndroid Build Coastguard Worker }; 75*8975f5c5SAndroid Build Coastguard Worker 76*8975f5c5SAndroid Build Coastguard Worker } // namespace rx 77*8975f5c5SAndroid Build Coastguard Worker 78*8975f5c5SAndroid Build Coastguard Worker #endif // LIBANGLE_RENDERER_GL_DISPLAYGL_H_ 79