| Index: webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
|
| diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
|
| index de4a60f377a09362bf3cfefaadf463bc3bbf38d6..7176642dc801ed1f9e567604c59be1299af66980 100644
|
| --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
|
| +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
|
| @@ -174,13 +174,13 @@ void WebPluginDelegateImpl::UpdateGeometry(
|
| }
|
| }
|
|
|
| -void WebPluginDelegateImpl::Paint(cairo_surface_t* context,
|
| +void WebPluginDelegateImpl::Paint(cairo_t* context,
|
| const gfx::Rect& rect) {
|
| if (windowless_)
|
| WindowlessPaint(context, rect);
|
| }
|
|
|
| -void WebPluginDelegateImpl::Print(cairo_surface_t* context) {
|
| +void WebPluginDelegateImpl::Print(cairo_t* context) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| @@ -399,7 +399,7 @@ void DrawDebugRectangle(cairo_surface_t* surface,
|
| } // namespace
|
| #endif
|
|
|
| -void WebPluginDelegateImpl::WindowlessPaint(cairo_surface_t* context,
|
| +void WebPluginDelegateImpl::WindowlessPaint(cairo_t* context,
|
| const gfx::Rect& damage_rect) {
|
| // Compare to:
|
| // http://mxr.mozilla.org/firefox/source/layout/generic/nsObjectFrame.cpp:
|
| @@ -526,7 +526,8 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_surface_t* context,
|
| // Copy the current image into the pixmap, so the plugin can draw over
|
| // this background.
|
| cairo_t* cairo = gdk_cairo_create(pixmap_);
|
| - cairo_set_source_surface(cairo, context, offset_x, offset_y);
|
| + cairo_set_source_surface(cairo, cairo_get_target(context),
|
| + offset_x, offset_y);
|
| cairo_rectangle(cairo, draw_rect.x() + offset_x, draw_rect.y() + offset_y,
|
| draw_rect.width(), draw_rect.height());
|
| cairo_clip(cairo);
|
| @@ -551,13 +552,12 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_surface_t* context,
|
| DCHECK_EQ(err, NPERR_NO_ERROR);
|
|
|
| // Now copy the rendered image pixmap back into the drawing buffer.
|
| - cairo = cairo_create(context);
|
| - gdk_cairo_set_source_pixmap(cairo, pixmap_, -offset_x, -offset_y);
|
| - cairo_rectangle(cairo, draw_rect.x(), draw_rect.y(),
|
| + gdk_cairo_set_source_pixmap(context, pixmap_, -offset_x, -offset_y);
|
| + cairo_rectangle(context, draw_rect.x(), draw_rect.y(),
|
| draw_rect.width(), draw_rect.height());
|
| - cairo_clip(cairo);
|
| - cairo_paint(cairo);
|
| - cairo_destroy(cairo);
|
| + cairo_clip(context);
|
| + cairo_paint(context);
|
| + cairo_destroy(context);
|
|
|
| #ifdef DEBUG_RECTANGLES
|
| // Draw some debugging rectangles.
|
|
|