Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: src/core/SkCanvas.cpp

Issue 269693003: SkClipStack::Element tweaks. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebased Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkClipStack.h ('k') | src/core/SkClipStack.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 3134c4668689b75323efb5de155037955bfbbe64..bdbcd3be740fbd79fd7cdae4c4a954d63a88b31c 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1666,22 +1666,8 @@ void SkCanvas::replayClips(ClipVisitor* visitor) const {
SkClipStack::B2TIter iter(fClipStack);
const SkClipStack::Element* element;
- static const SkRect kEmpty = { 0, 0, 0, 0 };
while ((element = iter.next()) != NULL) {
- switch (element->getType()) {
- case SkClipStack::Element::kPath_Type:
- visitor->clipPath(element->getPath(), element->getOp(), element->isAA());
- break;
- case SkClipStack::Element::kRRect_Type:
- visitor->clipRRect(element->getRRect(), element->getOp(), element->isAA());
- break;
- case SkClipStack::Element::kRect_Type:
- visitor->clipRect(element->getRect(), element->getOp(), element->isAA());
- break;
- case SkClipStack::Element::kEmpty_Type:
- visitor->clipRect(kEmpty, SkRegion::kIntersect_Op, false);
- break;
- }
+ element->replay(visitor);
}
}
@@ -2556,7 +2542,7 @@ int SkCanvas::LayerIter::y() const { return fImpl->getY(); }
///////////////////////////////////////////////////////////////////////////////
-SkCanvas::ClipVisitor::~ClipVisitor() { }
+SkCanvasClipVisitor::~SkCanvasClipVisitor() { }
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « include/core/SkClipStack.h ('k') | src/core/SkClipStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698