Index: webkit/port/platform/graphics/PlatformContextSkia.cpp |
diff --git a/webkit/port/platform/graphics/PlatformContextSkia.cpp b/webkit/port/platform/graphics/PlatformContextSkia.cpp |
index dd50cb01f22c75258b01e1d5f5f5a3ec73a1afff..fd5cf9181386c9c4fea223fd7c4fc6f517e70716 100644 |
--- a/webkit/port/platform/graphics/PlatformContextSkia.cpp |
+++ b/webkit/port/platform/graphics/PlatformContextSkia.cpp |
@@ -43,6 +43,10 @@ |
#include "SkShader.h" |
#include "SkDashPathEffect.h" |
+#if defined(OS_LINUX) |
+#include "GdkSkia.h" |
+#endif |
+ |
// State ----------------------------------------------------------------------- |
// Encapsulates the additional painting state information we store for each |
@@ -145,10 +149,19 @@ PlatformContextSkia::PlatformContextSkia(gfx::PlatformCanvas* canvas) |
{ |
m_stateStack.append(State()); |
m_state = &m_stateStack.last(); |
+#if defined(OS_LINUX) |
+ m_gdkskia = m_canvas ? gdk_skia_new(m_canvas) : NULL; |
+#endif |
} |
PlatformContextSkia::~PlatformContextSkia() |
{ |
+#if defined(OS_LINUX) |
+ if (m_gdkskia) { |
+ g_object_unref(m_gdkskia); |
+ m_gdkskia = NULL; |
+ } |
+#endif |
} |
void PlatformContextSkia::setCanvas(gfx::PlatformCanvas* canvas) |