Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
index e1d669688b62e4afe40b8548985fae400be20209..2c105bb1d4762b7a7225712eeda7ed831e757f0f 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -510,7 +510,14 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurface( |
AsWeakPtr(), |
callback); |
pending_thumbnail_tasks_.push_back(callback); |
- gfx::Rect src_subrect_in_pixel = ConvertRectToPixel(this, src_subrect); |
+ |
+ // Convert |src_subrect| from the views coordinate (upper-left origin) into |
+ // the OpenGL coordinate (lower-left origin). |
+ gfx::Rect src_subrect_in_gl = src_subrect; |
+ src_subrect_in_gl.set_y( |
+ GetViewBounds().height() - src_subrect.y() - src_subrect.height()); |
Nico
2012/07/27 23:41:24
- src_subrect.bottom() is a bit shorter and does t
mazda
2012/07/28 00:31:44
Done.
Scaling is done by ConvertRectToPixel below
|
+ |
+ gfx::Rect src_subrect_in_pixel = ConvertRectToPixel(this, src_subrect_in_gl); |
gl_helper->CopyTextureTo(container->texture_id(), |
container->size(), |
src_subrect_in_pixel, |