Index: skia/ext/canvas_paint_gtk.h |
diff --git a/skia/ext/canvas_paint_gtk.h b/skia/ext/canvas_paint_gtk.h |
index fca12cadcbde22d64ede03ca7351e7435bdce0ee..ade49af533f04dc9360a1c5dda463c64dd381063 100644 |
--- a/skia/ext/canvas_paint_gtk.h |
+++ b/skia/ext/canvas_paint_gtk.h |
@@ -8,6 +8,7 @@ |
#pragma once |
#include "base/logging.h" |
+#include "skia/ext/canvas_paint_common.h" |
#include "skia/ext/platform_canvas.h" |
#include <gdk/gdk.h> |
@@ -39,7 +40,7 @@ class CanvasPaintT : public T { |
virtual ~CanvasPaintT() { |
if (!is_empty()) { |
- T::restoreToCount(1); |
+ GetPlatformCanvas(this)->restoreToCount(1); |
// Blit the dirty rect to the window. |
CHECK(window_); |
@@ -83,16 +84,17 @@ class CanvasPaintT : public T { |
private: |
void init(bool opaque) { |
GdkRectangle bounds = rectangle(); |
- if (!T::initialize(bounds.width, bounds.height, opaque, NULL)) { |
+ PlatformCanvas* canvas = GetPlatformCanvas(this); |
+ if (!canvas->initialize(bounds.width, bounds.height, opaque, NULL)) { |
// Cause a deliberate crash; |
CHECK(false); |
} |
// Need to translate so that the dirty region appears at the origin of the |
// surface. |
- T::translate(-SkIntToScalar(bounds.x), -SkIntToScalar(bounds.y)); |
+ canvas->translate(-SkIntToScalar(bounds.x), -SkIntToScalar(bounds.y)); |
- context_ = BeginPlatformPaint(this); |
+ context_ = BeginPlatformPaint(canvas); |
} |
cairo_t* context_; |