| 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..fd9f83a9cf047a49603cd9611d49d4e80105549a 100644
|
| --- a/content/common/gpu/client/gl_helper.h
|
| +++ b/content/common/gpu/client/gl_helper.h
|
| @@ -30,19 +30,37 @@ class GLHelper {
|
|
|
| // Copies the block of pixels specified with |src_subrect| from |src_texture|,
|
| // scales it to |dst_size|, and writes it into |out|.
|
| - // |src_size| is the size of |src_texture|. |callback| is invoked with the
|
| - // copy result when the copy operation has completed.
|
| - void CopyTextureTo(WebKit::WebGLId src_texture,
|
| - const gfx::Size& src_size,
|
| - const gfx::Rect& src_subrect,
|
| - const gfx::Size& dst_size,
|
| - unsigned char* out,
|
| - const base::Callback<void(bool)>& callback);
|
| + // |src_size| is the size of |src_texture|. The result is of format GL_BGRA
|
| + // and is potentially flipped vertically to make it a correct image
|
| + // representation. |callback| is invoked with the copy result when the copy
|
| + // operation has completed.
|
| + void CropScaleReadbackAndCleanTexture(
|
| + WebKit::WebGLId src_texture,
|
| + const gfx::Size& src_size,
|
| + const gfx::Rect& src_subrect,
|
| + const gfx::Size& dst_size,
|
| + unsigned char* out,
|
| + const base::Callback<void(bool)>& callback);
|
| +
|
| + // Copies the texture data out of |texture| into |out|. |size| is the
|
| + // size of the texture. No post processing is applied to the pixels. 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 ReadbackTextureSync(WebKit::WebGLId texture,
|
| + 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 CopyAndScaleTexture(WebKit::WebGLId texture,
|
| + 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);
|
|
|