diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 20:02:10 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 20:02:10 +0000 |
commit | 3d2da9c08491d46c0b3f8dcdccbb6d1c84bfbc40 (patch) | |
tree | 69a5b20223783d3ba79a2d0652bdc2cb756020f3 /chrome/renderer/webplugin_delegate_proxy.cc | |
parent | 4ed4ec64a3ac63c865f7ccfeed4abb64e251bd62 (diff) | |
download | chromium_src-3d2da9c08491d46c0b3f8dcdccbb6d1c84bfbc40.zip chromium_src-3d2da9c08491d46c0b3f8dcdccbb6d1c84bfbc40.tar.gz chromium_src-3d2da9c08491d46c0b3f8dcdccbb6d1c84bfbc40.tar.bz2 |
Revert previous clipping rect change for Cairo to see if it fixes the build.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20516 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webplugin_delegate_proxy.cc')
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index 7c0edeb..c723097 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -932,9 +932,16 @@ 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) - cairo_t* cairo = canvas.getTopPlatformDevice().beginPlatformPaint(); - cairo_set_source_surface(cairo, cairo_get_target(context), - plugin_rect_.x(), plugin_rect_.y()); + // 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_paint(cairo); // We have no endPlatformPaint() on the Linux PlatformDevice. // The cairo_t* is owned by the device. |