diff options
author | 2012-02-24 21:54:07 +0000 | |
---|---|---|
committer | 2012-02-24 21:54:07 +0000 | |
commit | a907ac3e3e3458fbb5d673c3feafb31fd7647b38 (patch) | |
tree | 84e58c13e275f71b326630f3bb878057373fa2a2 /include/core/SkCanvas.h | |
parent | 3cc0d8a6f0feb66a60d3edac12c5a12a0e92ae93 (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@3261 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..84d10386fa 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. Called internally by saveLayer. + // returns false if the entire rectangle is entirely clipped out + bool clipRectBounds(const SkRect* bounds, SaveFlags flags, + SkIRect* intersection); + private: class MCRec; |