Index: chrome/renderer/safe_browsing/phishing_thumbnailer.cc |
=================================================================== |
--- chrome/renderer/safe_browsing/phishing_thumbnailer.cc (revision 167659) |
+++ chrome/renderer/safe_browsing/phishing_thumbnailer.cc (working copy) |
@@ -32,10 +32,12 @@ |
} |
WebView* view = render_view->GetWebView(); |
base::TimeTicks beginning_time = base::TimeTicks::Now(); |
- skia::PlatformCanvas canvas; |
- if (!canvas.initialize(view_size.width(), view_size.height(), true)) { |
+ SkCanvas* canvas = skia::CreatePlatformCanvas(view_size.width(), |
+ view_size.height(), true, 0, |
+ skia::RETURN_NULL_ON_FAILURE); |
+ if (!canvas) |
return SkBitmap(); |
- } |
+ SkAutoUnref au(canvas); |
// Make sure we are not using any zoom when we take the snapshot. We will |
// restore the previous zoom level after the snapshot is taken. |
@@ -49,10 +51,10 @@ |
view->mainFrame()->setCanHaveScrollbars(false); // always hide scrollbars. |
view->resize(view_size); |
view->layout(); |
- view->paint(webkit_glue::ToWebCanvas(&canvas), |
+ view->paint(webkit_glue::ToWebCanvas(canvas), |
WebRect(0, 0, view_size.width(), view_size.height())); |
- SkDevice* device = skia::GetTopDevice(canvas); |
+ SkDevice* device = skia::GetTopDevice(*canvas); |
// Now resize the thumbnail to the right size. Note: it is important that we |
// use this resize algorithm here. |