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

Unified Diff: chrome/renderer/automation/automation_renderer_helper.cc

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « no previous file | chrome/renderer/chrome_render_view_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/automation/automation_renderer_helper.cc
===================================================================
--- chrome/renderer/automation/automation_renderer_helper.cc (revision 167659)
+++ chrome/renderer/automation/automation_renderer_helper.cc (working copy)
@@ -67,9 +67,9 @@
view->layout();
frame->setScrollOffset(WebSize(0, 0));
- skia::PlatformCanvas canvas(
- new_size.width, new_size.height, true /* is_opaque */);
- view->paint(webkit_glue::ToWebCanvas(&canvas),
+ skia::ScopedPlatformCanvas canvas(new_size.width, new_size.height, true);
+
+ view->paint(webkit_glue::ToWebCanvas(canvas),
gfx::Rect(0, 0, new_size.width, new_size.height));
frame->setCanHaveScrollbars(true);
@@ -80,7 +80,7 @@
frame->setScrollOffset(WebSize(old_scroll.width - min_scroll.width,
old_scroll.height - min_scroll.height));
- const SkBitmap& bmp = skia::GetTopDevice(canvas)->accessBitmap(false);
+ const SkBitmap& bmp = skia::GetTopDevice(*canvas)->accessBitmap(false);
SkAutoLockPixels lock_pixels(bmp);
// EncodeBGRA uses FORMAT_SkBitmap, which doesn't work on windows for some
// cases dealing with transparency. See crbug.com/96317. Use FORMAT_BGRA.
« no previous file with comments | « no previous file | chrome/renderer/chrome_render_view_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698