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 /webkit | |
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 'webkit')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 20 | ||||
-rw-r--r-- | webkit/tools/test_shell/webwidget_host_gtk.cc | 7 |
2 files changed, 14 insertions, 13 deletions
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. diff --git a/webkit/tools/test_shell/webwidget_host_gtk.cc b/webkit/tools/test_shell/webwidget_host_gtk.cc index 9703213..dd5b311 100644 --- a/webkit/tools/test_shell/webwidget_host_gtk.cc +++ b/webkit/tools/test_shell/webwidget_host_gtk.cc @@ -357,10 +357,11 @@ void WebWidgetHost::Paint() { gdk_window_begin_paint_rect(window, &grect); // BitBlit to the gdk window. - cairo_t* source_surface = canvas_->beginPlatformPaint(); + skia::PlatformDevice& platdev = canvas_->getTopPlatformDevice(); + skia::BitmapPlatformDevice* const bitdev = + static_cast<skia::BitmapPlatformDevice*>(&platdev); cairo_t* cairo_drawable = gdk_cairo_create(window); - cairo_set_source_surface(cairo_drawable, cairo_get_target(source_surface), - 0, 0); + cairo_set_source_surface(cairo_drawable, bitdev->surface(), 0, 0); cairo_paint(cairo_drawable); cairo_destroy(cairo_drawable); |