aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkCanvas.h
diff options
context:
space:
mode:
authorGravatar junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-18 16:21:08 +0000
committerGravatar junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-18 16:21:08 +0000
commit4370aedf7f55af74e9ebb4ad1c2e010c08236dfa (patch)
tree8e40be5c00cc08f9ede4901ff09da05caec93755 /include/core/SkCanvas.h
parent20ad5ac8f6e58390c0b511d00c66df61185af889 (diff)
Adding class SkDeferredCanvas for deferred rendering.
TEST=added a new pass to gm, so all gm tests are run through SkDeferredCanvas REVIEW=http://codereview.appspot.com/5430058/ git-svn-id: http://skia.googlecode.com/svn/trunk@3059 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r--include/core/SkCanvas.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 24e4141442..a6f7c7810d 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -78,7 +78,7 @@ public:
reference count is incremented. If the canvas was already holding a
device, its reference count is decremented. The new device is returned.
*/
- SkDevice* setDevice(SkDevice* device);
+ virtual SkDevice* setDevice(SkDevice* device);
/**
* saveLayer() can create another device (which is later drawn onto
@@ -278,7 +278,7 @@ public:
/** Returns the number of matrix/clip states on the SkCanvas' private stack.
This will equal # save() calls - # restore() calls.
*/
- int getSaveCount() const;
+ virtual int getSaveCount() const;
/** Efficient way to pop any calls to save() that happened after the save
count reached saveCount. It is an error for saveCount to be less than
@@ -845,7 +845,7 @@ public:
This does not account for the translate in any of the devices.
@return The current matrix on the canvas.
*/
- const SkMatrix& getTotalMatrix() const;
+ virtual const SkMatrix& getTotalMatrix() const;
enum ClipType {
kEmpty_ClipType = 0,
@@ -921,6 +921,12 @@ public:
};
protected:
+ // Returns the canvas to be used by DrawIter. Default implementation
+ // returns this. Subclasses that encapsulate an indirect canvas may
+ // need to overload this method. The impl must keep track of this, as it
+ // is not released or deleted by the caller.
+ virtual SkCanvas* canvasForDrawIter();
+
// all of the drawBitmap variants call this guy
virtual void commonDrawBitmap(const SkBitmap&, const SkIRect*,
const SkMatrix&, const SkPaint& paint);