1*8975f5c5SAndroid Build Coastguard Worker // 2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2016 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 // DisplayNULL.h: 7*8975f5c5SAndroid Build Coastguard Worker // Defines the class interface for DisplayNULL, implementing DisplayImpl. 8*8975f5c5SAndroid Build Coastguard Worker // 9*8975f5c5SAndroid Build Coastguard Worker 10*8975f5c5SAndroid Build Coastguard Worker #ifndef LIBANGLE_RENDERER_NULL_DISPLAYNULL_H_ 11*8975f5c5SAndroid Build Coastguard Worker #define LIBANGLE_RENDERER_NULL_DISPLAYNULL_H_ 12*8975f5c5SAndroid Build Coastguard Worker 13*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/DisplayImpl.h" 14*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/ShareGroupImpl.h" 15*8975f5c5SAndroid Build Coastguard Worker 16*8975f5c5SAndroid Build Coastguard Worker namespace rx 17*8975f5c5SAndroid Build Coastguard Worker { 18*8975f5c5SAndroid Build Coastguard Worker class ShareGroupNULL : public ShareGroupImpl 19*8975f5c5SAndroid Build Coastguard Worker { 20*8975f5c5SAndroid Build Coastguard Worker public: ShareGroupNULL(const egl::ShareGroupState & state)21*8975f5c5SAndroid Build Coastguard Worker ShareGroupNULL(const egl::ShareGroupState &state) : ShareGroupImpl(state) {} 22*8975f5c5SAndroid Build Coastguard Worker }; 23*8975f5c5SAndroid Build Coastguard Worker 24*8975f5c5SAndroid Build Coastguard Worker class AllocationTrackerNULL; 25*8975f5c5SAndroid Build Coastguard Worker 26*8975f5c5SAndroid Build Coastguard Worker class DisplayNULL : public DisplayImpl 27*8975f5c5SAndroid Build Coastguard Worker { 28*8975f5c5SAndroid Build Coastguard Worker public: 29*8975f5c5SAndroid Build Coastguard Worker DisplayNULL(const egl::DisplayState &state); 30*8975f5c5SAndroid Build Coastguard Worker ~DisplayNULL() override; 31*8975f5c5SAndroid Build Coastguard Worker 32*8975f5c5SAndroid Build Coastguard Worker egl::Error initialize(egl::Display *display) override; 33*8975f5c5SAndroid Build Coastguard Worker void terminate() override; 34*8975f5c5SAndroid Build Coastguard Worker 35*8975f5c5SAndroid Build Coastguard Worker egl::Error makeCurrent(egl::Display *display, 36*8975f5c5SAndroid Build Coastguard Worker egl::Surface *drawSurface, 37*8975f5c5SAndroid Build Coastguard Worker egl::Surface *readSurface, 38*8975f5c5SAndroid Build Coastguard Worker gl::Context *context) override; 39*8975f5c5SAndroid Build Coastguard Worker 40*8975f5c5SAndroid Build Coastguard Worker egl::ConfigSet generateConfigs() override; 41*8975f5c5SAndroid Build Coastguard Worker 42*8975f5c5SAndroid Build Coastguard Worker bool testDeviceLost() override; 43*8975f5c5SAndroid Build Coastguard Worker egl::Error restoreLostDevice(const egl::Display *display) override; 44*8975f5c5SAndroid Build Coastguard Worker 45*8975f5c5SAndroid Build Coastguard Worker bool isValidNativeWindow(EGLNativeWindowType window) const override; 46*8975f5c5SAndroid Build Coastguard Worker 47*8975f5c5SAndroid Build Coastguard Worker std::string getRendererDescription() override; 48*8975f5c5SAndroid Build Coastguard Worker std::string getVendorString() override; 49*8975f5c5SAndroid Build Coastguard Worker std::string getVersionString(bool includeFullVersion) override; 50*8975f5c5SAndroid Build Coastguard Worker 51*8975f5c5SAndroid Build Coastguard Worker DeviceImpl *createDevice() override; 52*8975f5c5SAndroid Build Coastguard Worker 53*8975f5c5SAndroid Build Coastguard Worker egl::Error waitClient(const gl::Context *context) override; 54*8975f5c5SAndroid Build Coastguard Worker egl::Error waitNative(const gl::Context *context, EGLint engine) override; 55*8975f5c5SAndroid Build Coastguard Worker gl::Version getMaxSupportedESVersion() const override; 56*8975f5c5SAndroid Build Coastguard Worker gl::Version getMaxConformantESVersion() const override; 57*8975f5c5SAndroid Build Coastguard Worker 58*8975f5c5SAndroid Build Coastguard Worker SurfaceImpl *createWindowSurface(const egl::SurfaceState &state, 59*8975f5c5SAndroid Build Coastguard Worker EGLNativeWindowType window, 60*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 61*8975f5c5SAndroid Build Coastguard Worker SurfaceImpl *createPbufferSurface(const egl::SurfaceState &state, 62*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 63*8975f5c5SAndroid Build Coastguard Worker SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state, 64*8975f5c5SAndroid Build Coastguard Worker EGLenum buftype, 65*8975f5c5SAndroid Build Coastguard Worker EGLClientBuffer buffer, 66*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 67*8975f5c5SAndroid Build Coastguard Worker SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state, 68*8975f5c5SAndroid Build Coastguard Worker NativePixmapType nativePixmap, 69*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 70*8975f5c5SAndroid Build Coastguard Worker 71*8975f5c5SAndroid Build Coastguard Worker ImageImpl *createImage(const egl::ImageState &state, 72*8975f5c5SAndroid Build Coastguard Worker const gl::Context *context, 73*8975f5c5SAndroid Build Coastguard Worker EGLenum target, 74*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 75*8975f5c5SAndroid Build Coastguard Worker 76*8975f5c5SAndroid Build Coastguard Worker ContextImpl *createContext(const gl::State &state, 77*8975f5c5SAndroid Build Coastguard Worker gl::ErrorSet *errorSet, 78*8975f5c5SAndroid Build Coastguard Worker const egl::Config *configuration, 79*8975f5c5SAndroid Build Coastguard Worker const gl::Context *shareContext, 80*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 81*8975f5c5SAndroid Build Coastguard Worker 82*8975f5c5SAndroid Build Coastguard Worker StreamProducerImpl *createStreamProducerD3DTexture(egl::Stream::ConsumerType consumerType, 83*8975f5c5SAndroid Build Coastguard Worker const egl::AttributeMap &attribs) override; 84*8975f5c5SAndroid Build Coastguard Worker 85*8975f5c5SAndroid Build Coastguard Worker ShareGroupImpl *createShareGroup(const egl::ShareGroupState &state) override; 86*8975f5c5SAndroid Build Coastguard Worker populateFeatureList(angle::FeatureList * features)87*8975f5c5SAndroid Build Coastguard Worker void populateFeatureList(angle::FeatureList *features) override {} 88*8975f5c5SAndroid Build Coastguard Worker 89*8975f5c5SAndroid Build Coastguard Worker private: 90*8975f5c5SAndroid Build Coastguard Worker void generateExtensions(egl::DisplayExtensions *outExtensions) const override; 91*8975f5c5SAndroid Build Coastguard Worker void generateCaps(egl::Caps *outCaps) const override; 92*8975f5c5SAndroid Build Coastguard Worker 93*8975f5c5SAndroid Build Coastguard Worker std::unique_ptr<AllocationTrackerNULL> mAllocationTracker; 94*8975f5c5SAndroid Build Coastguard Worker }; 95*8975f5c5SAndroid Build Coastguard Worker 96*8975f5c5SAndroid Build Coastguard Worker } // namespace rx 97*8975f5c5SAndroid Build Coastguard Worker 98*8975f5c5SAndroid Build Coastguard Worker #endif // LIBANGLE_RENDERER_NULL_DISPLAYNULL_H_ 99