| Index: chrome/renderer/webplugin_delegate_proxy.cc
|
| diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
|
| index e07368da9d85849cd9b1d296d9342ee6ad88d76d..52f098083e7c8c19cec0134ec59b4207491dc993 100644
|
| --- a/chrome/renderer/webplugin_delegate_proxy.cc
|
| +++ b/chrome/renderer/webplugin_delegate_proxy.cc
|
| @@ -860,7 +860,7 @@ void WebPluginDelegateProxy::OnGetCPBrowsingContext(uint32* context) {
|
| *context = render_view_ ? render_view_->GetCPBrowsingContext() : 0;
|
| }
|
|
|
| -void WebPluginDelegateProxy::PaintSadPlugin(gfx::NativeDrawingContext hdc,
|
| +void WebPluginDelegateProxy::PaintSadPlugin(gfx::NativeDrawingContext context,
|
| const gfx::Rect& rect) {
|
| const int width = plugin_rect_.width();
|
| const int height = plugin_rect_.height();
|
| @@ -886,18 +886,11 @@ void WebPluginDelegateProxy::PaintSadPlugin(gfx::NativeDrawingContext hdc,
|
|
|
| #if defined(OS_WIN)
|
| skia::PlatformDevice& device = canvas.getTopPlatformDevice();
|
| - device.drawToHDC(hdc, plugin_rect_.x(), plugin_rect_.y(), NULL);
|
| + 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(hdc);
|
| - 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);
|
| cairo_destroy(cairo);
|
| // We have no endPlatformPaint() on the Linux PlatformDevice.
|
|
|