Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: ui/gl/gl_image.h

Issue 22824009: Remove StreamTextureManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_image.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698