Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1613)

Unified Diff: webkit/tools/test_shell/gtk/webwidget_host.cc

Issue 8227: Switch from using GdkPixbuf to cairo for painting on Drawables. (Closed)
Patch Set: Address comments Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/tools/test_shell/gtk/webwidget_host.cc
diff --git a/webkit/tools/test_shell/gtk/webwidget_host.cc b/webkit/tools/test_shell/gtk/webwidget_host.cc
index 79e39f581e51f68a331db5f2e7eefaa403dd25f2..f89f5f9a8f731b37dc567c40985513341c9336fc 100644
--- a/webkit/tools/test_shell/gtk/webwidget_host.cc
+++ b/webkit/tools/test_shell/gtk/webwidget_host.cc
@@ -4,6 +4,7 @@
#include "webkit/tools/test_shell/webwidget_host.h"
+#include <cairo/cairo.h>
#include <gtk/gtk.h>
#include "base/logging.h"
@@ -232,8 +233,11 @@ void WebWidgetHost::Paint() {
gfx::PlatformDeviceLinux &platdev = canvas_->getTopPlatformDevice();
gfx::BitmapPlatformDeviceLinux* const bitdev =
static_cast<gfx::BitmapPlatformDeviceLinux* >(&platdev);
- gdk_draw_pixbuf(view_->window, NULL, bitdev->pixbuf(),
- 0, 0, 0, 0, width, height, GDK_RGB_DITHER_NONE, 0, 0);
+
+ cairo_t* cairo_drawable = gdk_cairo_create(view_->window);
+ cairo_set_source_surface(cairo_drawable, bitdev->surface(), 0, 0);
+ cairo_paint(cairo_drawable);
+ cairo_destroy(cairo_drawable);
}
void WebWidgetHost::ResetScrollRect() {
« base/gfx/bitmap_platform_device_linux.h ('K') | « skia/include/corecg/SkUserConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698