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

Unified Diff: content/common/gpu/client/gl_helper.h

Issue 11234008: Enable texture readback support for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to remove local GLHelper from a method Created 8 years, 2 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
Index: content/common/gpu/client/gl_helper.h
diff --git a/content/common/gpu/client/gl_helper.h b/content/common/gpu/client/gl_helper.h
index 8157c9a96bed913ece6b6a2ceaa4ff35fc6c3f66..9e58b5bf776959fcde2a180fd22e8bd3d29aa6af 100644
--- a/content/common/gpu/client/gl_helper.h
+++ b/content/common/gpu/client/gl_helper.h
@@ -39,10 +39,24 @@ class GLHelper {
unsigned char* out,
const base::Callback<void(bool)>& callback);
+ // Copies the raw texture data out of |texture| into |out|. |size| is the
+ // size of the texture. The texture is assumed to have a format of GL_RGBA
+ // with a pixel type of GL_UNSIGNED_BYTE. This is a blocking call that calls
+ // glReadPixels on this current context.
+ void SyncCopyRawTextureTo(WebKit::WebGLId texture,
piman 2012/10/19 22:10:10 I'm not sure what you mean by Raw. This looks like
David Trainor- moved to gerrit 2012/10/19 22:33:54 So CopyTextureTo seems to also potentially swizzle
+ const gfx::Size& size,
+ unsigned char* out);
+
// Creates a copy of the specified texture. |size| is the size of the texture.
WebKit::WebGLId CopyTexture(WebKit::WebGLId texture,
const gfx::Size& size);
+ // Creates a scaled copy of the specified texture. |src_size| is the size of
+ // the texture and |dst_size| is the size of the resulting copy.
+ WebKit::WebGLId CopyTexture(WebKit::WebGLId texture,
piman 2012/10/19 22:10:10 No overloading please. CopyAndScaleTexture?
David Trainor- moved to gerrit 2012/10/19 23:11:27 Done.
+ const gfx::Size& src_size,
+ const gfx::Size& dst_size);
+
// Returns the shader compiled from the source.
WebKit::WebGLId CompileShaderFromSource(const WebKit::WGC3Dchar* source,
WebKit::WGC3Denum type);

Powered by Google App Engine
This is Rietveld 408576698