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

Unified Diff: content/plugin/webplugin_proxy.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 | « content/plugin/webplugin_proxy.h ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « content/plugin/webplugin_proxy.h ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698