summaryrefslogtreecommitdiffstats
path: root/skia/ext/platform_canvas.h
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 22:27:25 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 22:27:25 +0000
commit9ffeb66751381d847a30560029eb6f98de2f1a2b (patch)
treecc5524cec5b9959f34bb7a3947f7fa39a2274cc9 /skia/ext/platform_canvas.h
parent8cde687634d8a736aae7538a69d6a360814010c9 (diff)
downloadchromium_src-9ffeb66751381d847a30560029eb6f98de2f1a2b.zip
chromium_src-9ffeb66751381d847a30560029eb6f98de2f1a2b.tar.gz
chromium_src-9ffeb66751381d847a30560029eb6f98de2f1a2b.tar.bz2
Update use of SkCanvas and SkDevice to match change in Skia:
Refactor SkCanvas so that backends don't need to override it - instead take a device factory class. see: http://codereview.appspot.com/2103045/ BUG=New Skia devices required a corresponding canvas TEST=None Review URL: http://codereview.chromium.org/3590011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/platform_canvas.h')
-rw-r--r--skia/ext/platform_canvas.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/skia/ext/platform_canvas.h b/skia/ext/platform_canvas.h
index 1863d77..b602ed46 100644
--- a/skia/ext/platform_canvas.h
+++ b/skia/ext/platform_canvas.h
@@ -18,10 +18,11 @@ namespace skia {
// using both Skia operations and platform-specific operations.
class PlatformCanvas : public SkCanvas {
public:
- // Set is_opaque if you are going to erase the bitmap and not use
- // transparency: this will enable some optimizations.
// If you use the version with no arguments, you MUST call initialize()
PlatformCanvas();
+ explicit PlatformCanvas(SkDeviceFactory* factory);
+ // Set is_opaque if you are going to erase the bitmap and not use
+ // transparency: this will enable some optimizations.
PlatformCanvas(int width, int height, bool is_opaque);
virtual ~PlatformCanvas();
@@ -96,16 +97,6 @@ class PlatformCanvas : public SkCanvas {
// FIXME(brettw) is this necessary?
using SkCanvas::clipRect;
- protected:
- // Creates a device store for use by the canvas. We override this so that
- // the device is always our own so we know that we can use platform
- // operations on it.
- virtual SkDevice* createDevice(SkBitmap::Config,
- int width,
- int height,
- bool is_opaque,
- bool isForLayer);
-
private:
// Unimplemented. This is to try to prevent people from calling this function
// on SkCanvas. SkCanvas' version is not virtual, so we can't prevent this