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

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: Added intersect of src_size to actual texture_size 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
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..38d6bfce427640192f39b1b8ce81b15ac79cbfc3 100644
--- a/content/common/gpu/client/gl_helper.cc
+++ b/content/common/gpu/client/gl_helper.cc
@@ -273,6 +273,7 @@ class GLHelper::CopyTextureToImpl {
WebKit::WebGLId CopyAndScaleTexture(WebGLId texture,
const gfx::Size& src_size,
+ const gfx::Rect& src_rect,
const gfx::Size& dst_size,
bool vertically_flip_texture);
@@ -581,11 +582,12 @@ void GLHelper::CopyTextureToImpl::ReadbackTextureSync(WebGLId texture,
WebKit::WebGLId GLHelper::CopyTextureToImpl::CopyAndScaleTexture(
WebGLId src_texture,
const gfx::Size& src_size,
+ const gfx::Rect& src_rect,
const gfx::Size& dst_size,
bool vertically_flip_texture) {
return ScaleTexture(src_texture,
src_size,
- gfx::Rect(src_size),
+ src_rect,
dst_size,
vertically_flip_texture);
}
@@ -753,17 +755,20 @@ WebKit::WebGLId GLHelper::CopyTexture(WebKit::WebGLId texture,
InitCopyTextToImpl();
return copy_texture_to_impl_->CopyAndScaleTexture(texture,
size,
+ gfx::Rect(size),
size,
false);
}
WebKit::WebGLId GLHelper::CopyAndScaleTexture(WebKit::WebGLId texture,
const gfx::Size& src_size,
+ const gfx::Rect& src_rect,
const gfx::Size& dst_size,
bool vertically_flip_texture) {
InitCopyTextToImpl();
return copy_texture_to_impl_->CopyAndScaleTexture(texture,
src_size,
+ src_rect,
dst_size,
vertically_flip_texture);
}

Powered by Google App Engine
This is Rietveld 408576698