From 3d2da9c08491d46c0b3f8dcdccbb6d1c84bfbc40 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Mon, 13 Jul 2009 20:02:10 +0000 Subject: 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 --- webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'webkit/glue') diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index 7176642..de4a60f 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_t* context, +void WebPluginDelegateImpl::Paint(cairo_surface_t* context, const gfx::Rect& rect) { if (windowless_) WindowlessPaint(context, rect); } -void WebPluginDelegateImpl::Print(cairo_t* context) { +void WebPluginDelegateImpl::Print(cairo_surface_t* context) { NOTIMPLEMENTED(); } @@ -399,7 +399,7 @@ void DrawDebugRectangle(cairo_surface_t* surface, } // namespace #endif -void WebPluginDelegateImpl::WindowlessPaint(cairo_t* context, +void WebPluginDelegateImpl::WindowlessPaint(cairo_surface_t* context, const gfx::Rect& damage_rect) { // Compare to: // http://mxr.mozilla.org/firefox/source/layout/generic/nsObjectFrame.cpp: @@ -526,8 +526,7 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_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, cairo_get_target(context), - offset_x, offset_y); + cairo_set_source_surface(cairo, 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); @@ -552,12 +551,13 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_t* context, DCHECK_EQ(err, NPERR_NO_ERROR); // Now copy the rendered image pixmap back into the drawing buffer. - gdk_cairo_set_source_pixmap(context, pixmap_, -offset_x, -offset_y); - cairo_rectangle(context, draw_rect.x(), draw_rect.y(), + cairo = cairo_create(context); + gdk_cairo_set_source_pixmap(cairo, pixmap_, -offset_x, -offset_y); + cairo_rectangle(cairo, draw_rect.x(), draw_rect.y(), draw_rect.width(), draw_rect.height()); - cairo_clip(context); - cairo_paint(context); - cairo_destroy(context); + cairo_clip(cairo); + cairo_paint(cairo); + cairo_destroy(cairo); #ifdef DEBUG_RECTANGLES // Draw some debugging rectangles. -- cgit v1.1