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

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

Issue 11558039: Subrect snapshot support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix WebView build Created 8 years 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 | « content/common/gpu/client/gl_helper.h ('k') | content/public/browser/android/compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/gl_helper.cc
diff --git a/content/common/gpu/client/gl_helper.cc b/content/common/gpu/client/gl_helper.cc
index 88436958b06bbfedbb99b6e342643e00666af9b2..d41c55a9a9341b803e45aefec71081c8346e8632 100644
--- a/content/common/gpu/client/gl_helper.cc
+++ b/content/common/gpu/client/gl_helper.cc
@@ -268,7 +268,7 @@ class GLHelper::CopyTextureToImpl {
const base::Callback<void(bool)>& callback);
void ReadbackTextureSync(WebGLId texture,
- const gfx::Size& size,
+ const gfx::Rect& src_rect,
unsigned char* out);
WebKit::WebGLId CopyAndScaleTexture(WebGLId texture,
@@ -558,7 +558,7 @@ void GLHelper::CopyTextureToImpl::CropScaleReadbackAndCleanTexture(
}
void GLHelper::CopyTextureToImpl::ReadbackTextureSync(WebGLId texture,
- const gfx::Size& size,
+ const gfx::Rect& src_rect,
unsigned char* out) {
ScopedFramebuffer dst_framebuffer(context_, context_->createFramebuffer());
ScopedFramebufferBinder<GL_FRAMEBUFFER> framebuffer_binder(
@@ -569,10 +569,10 @@ void GLHelper::CopyTextureToImpl::ReadbackTextureSync(WebGLId texture,
GL_TEXTURE_2D,
texture,
0);
- context_->readPixels(0,
- 0,
- size.width(),
- size.height(),
+ context_->readPixels(src_rect.x(),
+ src_rect.y(),
+ src_rect.width(),
+ src_rect.height(),
GL_RGBA,
GL_UNSIGNED_BYTE,
out);
@@ -740,11 +740,11 @@ void GLHelper::CropScaleReadbackAndCleanTexture(
}
void GLHelper::ReadbackTextureSync(WebKit::WebGLId texture,
- const gfx::Size& size,
+ const gfx::Rect& src_rect,
unsigned char* out) {
InitCopyTextToImpl();
copy_texture_to_impl_->ReadbackTextureSync(texture,
- size,
+ src_rect,
out);
}
« no previous file with comments | « content/common/gpu/client/gl_helper.h ('k') | content/public/browser/android/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698