diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-10-28 02:39:17 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-10-28 02:39:17 +0000 |
commit | d6040f6f2fcb11fddad5d92b3cb7255e90931bcc (patch) | |
tree | e4ae07bbaf10515ba18b0064ccfa785cc300a235 /src | |
parent | 72e49b8982586a5d8b0425f16d909c05a36ea8c3 (diff) |
reload base after we call memmove
git-svn-id: http://skia.googlecode.com/svn/trunk@2549 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkAAClip.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp index 1640dcb416..47c650e9a2 100644 --- a/src/core/SkAAClip.cpp +++ b/src/core/SkAAClip.cpp @@ -460,6 +460,8 @@ bool SkAAClip::trimTopBottom() { return false; } + this->validate(); + const int width = fBounds.width(); RunHead* head = fRunHead; YOffset* yoff = head->yoffsets(); @@ -498,6 +500,10 @@ bool SkAAClip::trimTopBottom() { 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 @@ bool SkAAClip::trimTopBottom() { head->fRowCount -= skip; SkASSERT(head->fRowCount > 0); } + this->validate(); return true; } @@ -922,7 +929,9 @@ public: 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; } |