Index: ui/gfx/compositor/compositor_cc.cc |
=================================================================== |
--- ui/gfx/compositor/compositor_cc.cc (revision 110784) |
+++ ui/gfx/compositor/compositor_cc.cc (working copy) |
@@ -182,21 +182,14 @@ |
host_.composite(); |
} |
-bool CompositorCC::ReadPixels(SkBitmap* bitmap, const gfx::Rect& bounds) { |
- if (bounds.right() > size().width() || bounds.bottom() > size().height()) |
- return false; |
- // Convert to OpenGL coordinates. |
- gfx::Point new_origin(bounds.x(), |
- size().height() - bounds.height() - bounds.y()); |
- |
+bool CompositorCC::ReadPixels(SkBitmap* bitmap) { |
bitmap->setConfig(SkBitmap::kARGB_8888_Config, |
- bounds.width(), bounds.height()); |
+ size().width(), size().height()); |
bitmap->allocPixels(); |
SkAutoLockPixels lock_image(*bitmap); |
unsigned char* pixels = static_cast<unsigned char*>(bitmap->getPixels()); |
- if (host_.compositeAndReadback(pixels, |
- gfx::Rect(new_origin, bounds.size()))) { |
- SwizzleRGBAToBGRAAndFlip(pixels, bounds.size()); |
+ if (host_.compositeAndReadback(pixels, gfx::Rect(size()))) { |
+ SwizzleRGBAToBGRAAndFlip(pixels, size()); |
return true; |
} |
return false; |