diff options
Diffstat (limited to 'views/painter.cc')
-rw-r--r-- | views/painter.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/views/painter.cc b/views/painter.cc index 1c354da..c368a0a 100644 --- a/views/painter.cc +++ b/views/painter.cc @@ -7,6 +7,7 @@ #include "app/resource_bundle.h" #include "base/logging.h" #include "gfx/canvas.h" +#include "gfx/canvas_skia.h" #include "gfx/insets.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/effects/SkGradientShader.h" @@ -43,8 +44,9 @@ class GradientPainter : public Painter { // Need to unref shader, otherwise never deleted. s->unref(); - canvas->drawRectCoords(SkIntToScalar(0), SkIntToScalar(0), - SkIntToScalar(w), SkIntToScalar(h), paint); + canvas->AsCanvasSkia()->drawRectCoords( + SkIntToScalar(0), SkIntToScalar(0), SkIntToScalar(w), SkIntToScalar(h), + paint); } private: @@ -146,10 +148,10 @@ void Painter::PaintPainterAt(int x, int y, int w, int h, DCHECK(canvas && painter); if (w < 0 || h < 0) return; - canvas->save(); + canvas->AsCanvasSkia()->save(); canvas->TranslateInt(x, y); painter->Paint(w, h, canvas); - canvas->restore(); + canvas->AsCanvasSkia()->restore(); } // static |