diff options
author | 2012-02-24 20:07:08 +0000 | |
---|---|---|
committer | 2012-02-24 20:07:08 +0000 | |
commit | 421bcc375af0616c37a59b0508957ab54d8f6d12 (patch) | |
tree | e80529f6e6aefd08da53b3a4a333431544fad5ce /include/core/SkCanvas.h | |
parent | ddd0ed560721bc082b38eed7c11ea792ae0713ca (diff) |
Modify SkDeferredCanvas so that it uses its inherited SkCanvas to track matrix and clipping state
Removed 'virtual' from a few canvas methods that no longer need it thanks to this change.
BUG=http://code.google.com/p/skia/issues/detail?id=506
TEST=Canvas unit test
REVIEW=http://codereview.appspot.com/5697052/
git-svn-id: http://skia.googlecode.com/svn/trunk@3256 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r-- | include/core/SkCanvas.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 058979d0f7..9445f1736a 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -283,7 +283,7 @@ public: /** Returns the number of matrix/clip states on the SkCanvas' private stack. This will equal # save() calls - # restore() calls. */ - virtual int getSaveCount() const; + 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 @@ -850,7 +850,7 @@ public: This does not account for the translate in any of the devices. @return The current matrix on the canvas. */ - virtual const SkMatrix& getTotalMatrix() const; + const SkMatrix& getTotalMatrix() const; enum ClipType { kEmpty_ClipType = 0, @@ -936,6 +936,11 @@ protected: virtual void commonDrawBitmap(const SkBitmap&, const SkIRect*, const SkMatrix&, const SkPaint& paint); + // Clip rectangle bounds. Used internally by saveLayer. + // returns false if the entire rectangle is clipped out + bool clipRectBounds(const SkRect* bounds, SaveFlags flags, + SkIRect* intersection); + private: class MCRec; |