summaryrefslogtreecommitdiffstats
path: root/webkit/port/platform/chromium/RenderThemeGtk.cpp
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 19:19:19 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 19:19:19 +0000
commitd7af8e7d98ab79ad46707b08b6dd7f6ef272cbbe (patch)
treeafd72795ba73b8b88e60371f2b1b7959cf227e12 /webkit/port/platform/chromium/RenderThemeGtk.cpp
parent3975e6e094b6557215748d91c89394cb54532c23 (diff)
downloadchromium_src-d7af8e7d98ab79ad46707b08b6dd7f6ef272cbbe.zip
chromium_src-d7af8e7d98ab79ad46707b08b6dd7f6ef272cbbe.tar.gz
chromium_src-d7af8e7d98ab79ad46707b08b6dd7f6ef272cbbe.tar.bz2
Cache the GdkSkia object in PlatformContextSkia so that we aren't creating
and deleting them for every widget drawn. Review URL: http://codereview.chromium.org/9757 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5195 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/platform/chromium/RenderThemeGtk.cpp')
-rw-r--r--webkit/port/platform/chromium/RenderThemeGtk.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/webkit/port/platform/chromium/RenderThemeGtk.cpp b/webkit/port/platform/chromium/RenderThemeGtk.cpp
index 54b3254..9d2f2cd 100644
--- a/webkit/port/platform/chromium/RenderThemeGtk.cpp
+++ b/webkit/port/platform/chromium/RenderThemeGtk.cpp
@@ -29,7 +29,7 @@
#include "PlatformContextSkia.h"
#include "RenderObject.h"
#include "gtkdrawing.h"
-#include "gdkskiadrawable.h"
+#include "GdkSkia.h"
#include <gdk/gdk.h>
@@ -183,13 +183,9 @@ static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderOb
gdk_rectangle_intersect(&gdkRect, &gdkClipRect, &gdkClipRect);
- // TODO(agl): we should look at not creating this anew every time.
- GdkSkia* skiadrawable = gdk_skia_new(canvas);
-
const gint r =
- moz_gtk_widget_paint(type, skiadrawable, &gdkRect, &gdkClipRect, &mozState, flags, direction) != MOZ_GTK_SUCCESS;
+ moz_gtk_widget_paint(type, pcs->gdk_skia(), &gdkRect, &gdkClipRect, &mozState, flags, direction) != MOZ_GTK_SUCCESS;
- g_object_unref(skiadrawable);
return r;
}