| Index: ui/gl/gl_surface_egl.h
|
| diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h
|
| index 68a99af0e06b8a8cff81f5b7b6e51e70fb2a7006..6cdaf5d2620c0614cdecd8b19fed95d3945256a3 100644
|
| --- a/ui/gl/gl_surface_egl.h
|
| +++ b/ui/gl/gl_surface_egl.h
|
| @@ -111,6 +111,32 @@ class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL {
|
| DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL);
|
| };
|
|
|
| +// SurfacelessEGL is used as Offscreen surface when platform supports
|
| +// KHR_surfaceless_context and GL_OES_surfaceless_context. This would avoid the
|
| +// need to create a dummy EGLsurface in case we render to client API targets.
|
| +class GL_EXPORT SurfacelessEGL : public GLSurfaceEGL {
|
| + public:
|
| + explicit SurfacelessEGL(const gfx::Size& size);
|
| +
|
| + // Implement GLSurface.
|
| + virtual EGLConfig GetConfig() OVERRIDE;
|
| + virtual bool Initialize() OVERRIDE;
|
| + virtual void Destroy() OVERRIDE;
|
| + virtual bool IsOffscreen() OVERRIDE;
|
| + virtual bool SwapBuffers() OVERRIDE;
|
| + virtual gfx::Size GetSize() OVERRIDE;
|
| + virtual bool Resize(const gfx::Size& size) OVERRIDE;
|
| + virtual EGLSurface GetHandle() OVERRIDE;
|
| + virtual void* GetShareHandle() OVERRIDE;
|
| +
|
| + protected:
|
| + virtual ~SurfacelessEGL();
|
| +
|
| + private:
|
| + gfx::Size size_;
|
| + DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL);
|
| +};
|
| +
|
| } // namespace gfx
|
|
|
| #endif // UI_GL_GL_SURFACE_EGL_H_
|
|
|