Index: content/plugin/webplugin_proxy.cc |
=================================================================== |
--- content/plugin/webplugin_proxy.cc (revision 167659) |
+++ content/plugin/webplugin_proxy.cc (working copy) |
@@ -451,14 +451,11 @@ |
const TransportDIB::Handle& dib_handle, |
const gfx::Rect& window_rect, |
SkAutoTUnref<skia::PlatformCanvas>* canvas) { |
- canvas->reset(new skia::PlatformCanvas); |
- if (!canvas->get()->initialize( |
- window_rect.width(), |
- window_rect.height(), |
- true, |
- dib_handle)) { |
- canvas->reset(NULL); |
- } |
+ canvas->reset(skia::CreatePlatformCanvas(window_rect.width(), |
+ window_rect.height(), |
+ true, |
+ dib_handle, |
+ skia::RETURN_NULL_ON_FAILURE)); |
// The canvas does not own the section so we need to close it now. |
CloseHandle(dib_handle); |
} |