aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/SkCanvas.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index c415a10207..56ac2da646 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -218,7 +218,7 @@ public:
fCanvas = canvas;
canvas->updateDeviceCMCache();
- fClipStack = &canvas->getTotalClipStack();
+ fClipStack = &canvas->fClipStack;
fBounder = canvas->getBounder();
fCurrLayer = canvas->fMCRec->fTopLayer;
fSkipEmptyClips = skipEmptyClips;
@@ -1210,6 +1210,22 @@ void SkCanvas::validateClip() const {
}
#endif
+void SkCanvas::replayClips(ClipVisitor* visitor) const {
+ SkClipStack::B2FIter iter(fClipStack);
+ const SkClipStack::B2FIter::Clip* clip;
+
+ SkRect empty = {};
+ while ((clip = iter.next()) != NULL) {
+ if (clip->fPath) {
+ visitor->clipPath(*clip->fPath, clip->fOp, clip->fDoAA);
+ } else if (clip->fRect) {
+ visitor->clipRect(*clip->fRect, clip->fOp, clip->fDoAA);
+ } else {
+ visitor->clipRect(empty, SkRegion::kIntersect_Op, false);
+ }
+ }
+}
+
///////////////////////////////////////////////////////////////////////////////
void SkCanvas::computeLocalClipBoundsCompareType(EdgeType et) const {
@@ -1342,10 +1358,6 @@ const SkRegion& SkCanvas::getTotalClip() const {
return fMCRec->fRasterClip->forceGetBW();
}
-const SkClipStack& SkCanvas::getTotalClipStack() const {
- return fClipStack;
-}
-
void SkCanvas::setExternalMatrix(const SkMatrix* matrix) {
if (NULL == matrix || matrix->isIdentity()) {
if (fUseExternalMatrix) {