summaryrefslogtreecommitdiffstats
path: root/gfx/canvas_skia.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-25 16:33:23 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-25 16:33:23 +0000
commit74db48eb22cd8bfe4d028418d99e7aee6c220930 (patch)
tree94b62cc97d669cb965d2073c5d9a72a4a3c3ee04 /gfx/canvas_skia.h
parent2abd00dd89a5cbc9af4a88a59269fdf9f988cf12 (diff)
downloadchromium_src-74db48eb22cd8bfe4d028418d99e7aee6c220930.zip
chromium_src-74db48eb22cd8bfe4d028418d99e7aee6c220930.tar.gz
chromium_src-74db48eb22cd8bfe4d028418d99e7aee6c220930.tar.bz2
Canvas refactoring part 3.
- Replace Canvas instance users with CanvasSkia users. - Rename Canvas2 to Canvas. - Delete Canvas subclass of CanvasSkia. This has created some ugliness around the fact that people that used SkCanvas methods on Canvas now have to go through AsCanvasSkia first. This is temporary ugliness that will be eradicated as I incrementally build out the new Canvas API. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/canvas_skia.h')
-rw-r--r--gfx/canvas_skia.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/gfx/canvas_skia.h b/gfx/canvas_skia.h
index 9a976fd..cae4ac1 100644
--- a/gfx/canvas_skia.h
+++ b/gfx/canvas_skia.h
@@ -6,7 +6,7 @@
#define GFX_CANVAS_SKIA_H_
#include "base/basictypes.h"
-#include "gfx/canvas_2.h"
+#include "gfx/canvas.h"
#include "skia/ext/platform_canvas.h"
#if defined(OS_POSIX) && !defined(OS_MACOSX)
@@ -33,7 +33,7 @@ class Canvas;
// the variant that does not take a SkXfermode::Mode uses a transfer mode
// of kSrcOver_Mode.
class CanvasSkia : public skia::PlatformCanvas,
- public Canvas2 {
+ public Canvas {
public:
// Creates an empty Canvas. Callers must use initialize before using the
// canvas.
@@ -76,6 +76,9 @@ class CanvasSkia : public skia::PlatformCanvas,
int x, int y, int w, int h, int flags);
#endif
+ // Extracts a bitmap from the contents of this canvas.
+ SkBitmap ExtractBitmap() const;
+
// Overridden from Canvas2:
virtual bool GetClipRect(gfx::Rect* clip_rect);
virtual bool ClipRectInt(int x, int y, int w, int h);
@@ -115,7 +118,8 @@ class CanvasSkia : public skia::PlatformCanvas,
virtual void TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h);
virtual void TileImageInt(const SkBitmap& bitmap, int src_x, int src_y,
int dest_x, int dest_y, int w, int h);
- virtual SkBitmap ExtractBitmap() const;
+ virtual CanvasSkia* AsCanvasSkia();
+ virtual const CanvasSkia* AsCanvasSkia() const;
private:
#if defined(OS_WIN)