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

Unified Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 155700: Reverting 20516. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months 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 | « base/gfx/native_widget_types.h ('k') | skia/ext/bitmap_platform_device_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/webplugin_delegate_proxy.cc
===================================================================
--- chrome/renderer/webplugin_delegate_proxy.cc (revision 20972)
+++ chrome/renderer/webplugin_delegate_proxy.cc (working copy)
@@ -932,16 +932,9 @@
skia::PlatformDevice& device = canvas.getTopPlatformDevice();
device.drawToHDC(context, plugin_rect_.x(), plugin_rect_.y(), NULL);
#elif defined(OS_LINUX)
- // Though conceptually we've been handed a cairo_surface_t* and we
- // could've just hooked up the canvas to draw directly onto it, our
- // canvas implementation currently uses cairo as a dumb pixel buffer
- // and would have done the following copy anyway.
- // TODO(evanm): revisit when we have printing hooked up, as that might
- // change our usage of cairo.
- skia::PlatformDevice& device = canvas.getTopPlatformDevice();
- cairo_t* cairo = cairo_create(context);
- cairo_surface_t* source_surface = device.beginPlatformPaint();
- cairo_set_source_surface(cairo, source_surface, plugin_rect_.x(), plugin_rect_.y());
+ cairo_t* cairo = canvas.getTopPlatformDevice().beginPlatformPaint();
+ cairo_set_source_surface(cairo, cairo_get_target(context),
+ plugin_rect_.x(), plugin_rect_.y());
cairo_paint(cairo);
// We have no endPlatformPaint() on the Linux PlatformDevice.
// The cairo_t* is owned by the device.
« no previous file with comments | « base/gfx/native_widget_types.h ('k') | skia/ext/bitmap_platform_device_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698