reload base after we call memmove
git-svn-id: http://skia.googlecode.com/svn/trunk@2549 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp
index 1640dcb..47c650e 100644
--- a/src/core/SkAAClip.cpp
+++ b/src/core/SkAAClip.cpp
@@ -460,6 +460,8 @@
return false;
}
+ this->validate();
+
const int width = fBounds.width();
RunHead* head = fRunHead;
YOffset* yoff = head->yoffsets();
@@ -498,6 +500,10 @@
SkASSERT(!fBounds.isEmpty());
head->fRowCount -= skip;
SkASSERT(head->fRowCount > 0);
+
+ this->validate();
+ // need to reset this after the memmove
+ base = head->data();
}
// Look to trim away empty rows from the bottom.
@@ -520,6 +526,7 @@
head->fRowCount -= skip;
SkASSERT(head->fRowCount > 0);
}
+ this->validate();
return true;
}
@@ -922,7 +929,9 @@
SkASSERT(!(count & 1));
int w = 0;
for (int x = 0; x < count; x += 2) {
- w += ptr[0];
+ int n = ptr[0];
+ SkASSERT(n > 0);
+ w += n;
SkASSERT(w <= fWidth);
ptr += 2;
}