Index: gfx/canvas_skia.cc |
=================================================================== |
--- gfx/canvas_skia.cc (revision 50664) |
+++ gfx/canvas_skia.cc (working copy) |
@@ -2,13 +2,12 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "gfx/canvas.h" |
+#include "gfx/canvas_skia.h" |
#include <limits> |
#include "base/i18n/rtl.h" |
#include "base/logging.h" |
-#include "gfx/canvas.h" |
#include "gfx/font.h" |
#include "gfx/rect.h" |
#include "third_party/skia/include/core/SkShader.h" |
@@ -274,6 +273,14 @@ |
return result; |
} |
+CanvasSkia* CanvasSkia::AsCanvasSkia() { |
+ return this; |
+} |
+ |
+const CanvasSkia* CanvasSkia::AsCanvasSkia() const { |
+ return this; |
+} |
+ |
// static |
int CanvasSkia::DefaultCanvasTextAlignment() { |
if (!base::i18n::IsRTL()) |
@@ -282,19 +289,19 @@ |
} |
//////////////////////////////////////////////////////////////////////////////// |
-// Canvas2, public: |
+// Canvas, public: |
-Canvas2* Canvas2::CreateCanvas() { |
- return new Canvas; |
+Canvas* Canvas::CreateCanvas() { |
+ return new CanvasSkia; |
} |
-Canvas2* Canvas2::CreateCanvas(int width, int height, bool is_opaque) { |
- return new Canvas(width, height, is_opaque); |
+Canvas* Canvas::CreateCanvas(int width, int height, bool is_opaque) { |
+ return new CanvasSkia(width, height, is_opaque); |
} |
#if defined(OS_WIN) |
// TODO(beng): move to canvas_win.cc, etc. |
-class CanvasPaintWin : public CanvasSkiaPaint, public CanvasPaint2 { |
+class CanvasPaintWin : public CanvasSkiaPaint, public CanvasPaint { |
public: |
CanvasPaintWin(gfx::NativeView view) : CanvasSkiaPaint(view) {} |
@@ -307,13 +314,13 @@ |
return gfx::Rect(paintStruct().rcPaint); |
} |
- virtual Canvas2* AsCanvas2() { |
+ virtual Canvas* AsCanvas() { |
return this; |
} |
}; |
#endif |
-CanvasPaint2* CanvasPaint2::CreateCanvasPaint(gfx::NativeView view) { |
+CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { |
#if defined(OS_WIN) |
return new CanvasPaintWin(view); |
#else |