summaryrefslogtreecommitdiffstats
path: root/cc/output/software_renderer.cc
diff options
context:
space:
mode:
authormiu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-17 22:39:38 +0000
committermiu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-17 22:39:38 +0000
commitd4d844a29b271cabb96ca6d5bdccce8056c1b16f (patch)
tree8c15542bd470a712ecfde05c480f7844d900d236 /cc/output/software_renderer.cc
parent1efbb84347e9c7f030c5ae752c285da80d1b836a (diff)
downloadchromium_src-d4d844a29b271cabb96ca6d5bdccce8056c1b16f.zip
chromium_src-d4d844a29b271cabb96ca6d5bdccce8056c1b16f.tar.gz
chromium_src-d4d844a29b271cabb96ca6d5bdccce8056c1b16f.tar.bz2
Fix copy_rect calculation in CopyCurrentRendererPassToBitmap().
The calculation was second-guessing the copy request's subrect by force-translating its origin. This manifested as bug 280724, where the compositing layer for Flash fullscreen was being read back with erroneous -64 by -64 translation. Digging deeper, the RenderPass was drawing to output_rect=(-64, -64, screen_width+64, screen_height+64). The client was requesting area=(0, 0, screen_width, screen_height), and this is actually the correct region within the output_rect for the fullscreen content. Testing: 1. Ran cc_unittests --gtest_filter='*Readback*' 2. Installed Chromecast extension, and mirrored both normal tab content and fullscreen Flash content to Chromecast device. BUG=280724 Review URL: https://chromiumcodereview.appspot.com/23967012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/software_renderer.cc')
-rw-r--r--cc/output/software_renderer.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index 241968e..394d79a 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -492,11 +492,8 @@ void SoftwareRenderer::CopyCurrentRenderPassToBitmap(
DrawingFrame* frame,
scoped_ptr<CopyOutputRequest> request) {
gfx::Rect copy_rect = frame->current_render_pass->output_rect;
- if (request->has_area()) {
- // Intersect with the request's area, positioned with its origin at the
- // origin of the full copy_rect.
- copy_rect.Intersect(request->area() - copy_rect.OffsetFromOrigin());
- }
+ if (request->has_area())
+ copy_rect.Intersect(request->area());
gfx::Rect window_copy_rect = MoveFromDrawToWindowSpace(copy_rect);
scoped_ptr<SkBitmap> bitmap(new SkBitmap);