summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 20:39:38 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 20:39:38 +0000
commit777f996eab1610f9676ee62ee478cc97687c56cd (patch)
tree0b5df00b507bf0d0de8ba292541d7b0987f7f3ab /chrome/renderer
parent6e9f27f9b6839b7a07e44a6299bfa48579fe5ba2 (diff)
downloadchromium_src-777f996eab1610f9676ee62ee478cc97687c56cd.zip
chromium_src-777f996eab1610f9676ee62ee478cc97687c56cd.tar.gz
chromium_src-777f996eab1610f9676ee62ee478cc97687c56cd.tar.bz2
Reverting 20516 by re-landing this previous patch.
Keep the cairo clipping region in sync with the Skia one. The PlatformCanvas now tracks this, so we don't need to have the similar code in gfx::Canvas. I moved most references of cairo_surface_t to cairo_t since the cairo_t has a transform and clip but the surface does not. Review URL: http://codereview.chromium.org/149409 Review URL: http://codereview.chromium.org/155700 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index a5423ac..45a98bf 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -932,16 +932,9 @@ void WebPluginDelegateProxy::PaintSadPlugin(gfx::NativeDrawingContext context,
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.