Index: ui/gl/gl_image.h |
diff --git a/ui/gl/gl_image.h b/ui/gl/gl_image.h |
index f1d05371f6beeae8de923774023a8e8978b05dac..b26f120d86a0fc05e305577cd2ebffe6134f7d7c 100644 |
--- a/ui/gl/gl_image.h |
+++ b/ui/gl/gl_image.h |
@@ -15,6 +15,10 @@ namespace gfx { |
class GLSurface; |
+#if defined(OS_ANDROID) |
+class GLImageStream; |
+#endif |
+ |
// Encapsulates an image that can be bound to a texture, hiding platform |
// specific management. |
class GL_EXPORT GLImage : public base::RefCounted<GLImage> { |
@@ -27,12 +31,15 @@ class GL_EXPORT GLImage : public base::RefCounted<GLImage> { |
// Get the size of the image. |
virtual gfx::Size GetSize() = 0; |
- // Bind image to texture currently bound to GL_TEXTURE_2D target. |
+ // Bind image to texture currently bound to the relevant target. |
virtual bool BindTexImage(); |
- // Release image from texture currently bound to GL_TEXTURE_2D target. |
+ // Release image from texture it is currently bound to. |
virtual void ReleaseTexImage(); |
+ // Called before the texture is used for drawing. |
+ virtual void WillUseTexImage(); |
+ |
// Create a GL image for a window. |
static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); |
@@ -40,6 +47,13 @@ class GL_EXPORT GLImage : public base::RefCounted<GLImage> { |
static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( |
gfx::GpuMemoryBufferHandle buffer, gfx::Size size); |
+ // Create a GL image for a streaming texture. |
+ static scoped_refptr<GLImage> CreateGLImageForStreamTexture(); |
+ |
+#if defined(OS_ANDROID) |
+ virtual GLImageStream* AsGLImageStream(); |
+#endif |
+ |
protected: |
virtual ~GLImage(); |