aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-20 15:33:18 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-20 15:33:18 +0000
commit80214e26c57c5fea954006400852e8999e201923 (patch)
tree59e23fdd0310caa1438c979ffb91a5cb8aab2de6 /src
parentcbd0ad90307c2d9d1fce0239476fb03dec8eca9b (diff)
Made clarifying renamings to SkClipStack's iterators (and added to unit test)
Diffstat (limited to 'src')
-rw-r--r--src/core/SkCanvas.cpp8
-rw-r--r--src/core/SkClipStack.cpp2
-rw-r--r--src/pdf/SkPDFDevice.cpp14
3 files changed, 12 insertions, 12 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 567e5f5c15..4b0c1d9a74 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1212,8 +1212,8 @@ void SkCanvas::validateClip() const {
ir.set(0, 0, device->width(), device->height());
SkRasterClip tmpClip(ir);
- SkClipStack::B2FIter iter(fClipStack);
- const SkClipStack::B2FIter::Clip* clip;
+ SkClipStack::B2TIter iter(fClipStack);
+ const SkClipStack::B2TIter::Clip* clip;
while ((clip = iter.next()) != NULL) {
if (clip->fPath) {
clipPathHelper(this, &tmpClip, *clip->fPath, clip->fOp, clip->fDoAA);
@@ -1234,8 +1234,8 @@ void SkCanvas::validateClip() const {
#endif
void SkCanvas::replayClips(ClipVisitor* visitor) const {
- SkClipStack::B2FIter iter(fClipStack);
- const SkClipStack::B2FIter::Clip* clip;
+ SkClipStack::B2TIter iter(fClipStack);
+ const SkClipStack::B2TIter::Clip* clip;
SkRect empty = { 0, 0, 0, 0 };
while ((clip = iter.next()) != NULL) {
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index f7ddc97891..429d4c0e17 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -263,7 +263,7 @@ const SkClipStack::Iter::Clip* SkClipStack::Iter::prev() {
return this->updateClip(rec);
}
-const SkClipStack::Iter::Clip* SkClipStack::Iter::skipToLast(SkRegion::Op op) {
+const SkClipStack::Iter::Clip* SkClipStack::Iter::skipToTopmost(SkRegion::Op op) {
if (NULL == fStack) {
return NULL;
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 691ee26f24..7b774b77a2 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -217,17 +217,17 @@ void GraphicStackState::pop() {
fStackDepth--;
}
-// This function initializes iter to be an interator on the "stack" argument
+// This function initializes iter to be an iterator on the "stack" argument
// and then skips over the leading entries as specified in prefix. It requires
// and asserts that "prefix" will be a prefix to "stack."
static void skip_clip_stack_prefix(const SkClipStack& prefix,
const SkClipStack& stack,
SkClipStack::Iter* iter) {
- SkClipStack::B2FIter prefixIter(prefix);
- iter->reset(stack, SkClipStack::Iter::kFront_IterStart);
+ SkClipStack::B2TIter prefixIter(prefix);
+ iter->reset(stack, SkClipStack::Iter::kBottom_IterStart);
- const SkClipStack::B2FIter::Clip* prefixEntry;
- const SkClipStack::B2FIter::Clip* iterEntry;
+ const SkClipStack::B2TIter::Clip* prefixEntry;
+ const SkClipStack::B2TIter::Clip* iterEntry;
for (prefixEntry = prefixIter.next(); prefixEntry;
prefixEntry = prefixIter.next()) {
@@ -306,7 +306,7 @@ void GraphicStackState::updateClip(const SkClipStack& clipStack,
// If the clip stack does anything other than intersect or if it uses
// an inverse fill type, we have to fall back to the clip region.
bool needRegion = false;
- const SkClipStack::B2FIter::Clip* clipEntry;
+ const SkClipStack::B2TIter::Clip* clipEntry;
for (clipEntry = iter.next(); clipEntry; clipEntry = iter.next()) {
if (clipEntry->fOp != SkRegion::kIntersect_Op ||
(clipEntry->fPath && clipEntry->fPath->isInverseFillType())) {
@@ -323,7 +323,7 @@ void GraphicStackState::updateClip(const SkClipStack& clipStack,
skip_clip_stack_prefix(fEntries[0].fClipStack, clipStack, &iter);
SkMatrix transform;
transform.setTranslate(translation.fX, translation.fY);
- const SkClipStack::B2FIter::Clip* clipEntry;
+ const SkClipStack::B2TIter::Clip* clipEntry;
for (clipEntry = iter.next(); clipEntry; clipEntry = iter.next()) {
SkASSERT(clipEntry->fOp == SkRegion::kIntersect_Op);
if (clipEntry->fRect) {