Index: ui/gl/gl_surface_glx.h |
diff --git a/ui/gl/gl_surface_glx.h b/ui/gl/gl_surface_glx.h |
index f4416e81af6b8ed1622e99ef2cbff9a675c67d99..66144dcad3e17b78e1aab5892abea8995cdc9cb9 100644 |
--- a/ui/gl/gl_surface_glx.h |
+++ b/ui/gl/gl_surface_glx.h |
@@ -97,6 +97,33 @@ class GL_EXPORT PbufferGLSurfaceGLX : public GLSurfaceGLX { |
DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); |
}; |
+// A surface used to render to an offscreen pixmap. |
+class GL_EXPORT PixmapGLSurfaceGLX : public GLSurfaceGLX { |
piman
2012/06/12 23:15:38
Do you really need to make this structure a GLSurf
|
+ public: |
+ explicit PixmapGLSurfaceGLX(XID pixmap); |
+ |
+ // Implement GLSurfaceGLX. |
+ virtual bool Initialize() OVERRIDE; |
+ virtual void Destroy() OVERRIDE; |
+ virtual bool IsOffscreen() OVERRIDE; |
+ virtual bool SwapBuffers() OVERRIDE; |
+ virtual gfx::Size GetSize() OVERRIDE; |
+ virtual void* GetHandle() OVERRIDE; |
+ virtual void* GetConfig() OVERRIDE; |
+ virtual void* GetShareHandle() OVERRIDE; |
+ |
+ protected: |
+ virtual ~PixmapGLSurfaceGLX(); |
+ |
+ private: |
+ void* config_; |
+ XID pixmap_; |
+ XID glx_pixmap_; |
+ gfx::Size size_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PixmapGLSurfaceGLX); |
+}; |
+ |
} // namespace gfx |
#endif // UI_GL_GL_SURFACE_GLX_H_ |