Add some SkASSERT's, to try to track down a reliability issue in Chrome.
authorsenorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 12 Aug 2009 20:21:49 +0000 (20:21 +0000)
committersenorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 12 Aug 2009 20:21:49 +0000 (20:21 +0000)
http://codereview.appspot.com/105075
http://crbug.com/17569

git-svn-id: http://skia.googlecode.com/svn/trunk@317 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkScan_AntiPath.cpp

index f2f117a35f3724aa70ea78198640d8b64f02d238..922c0ab4a77bc50344c4ffc66bdb9047397ab902 100644 (file)
@@ -319,11 +319,15 @@ void MaskSuperBlitter::blitH(int x, int y, int width)
 
     if (n < 0)
     {
+        SkASSERT(row >= fMask.fImage);
+        SkASSERT(row < fMask.fImage + kMAX_STORAGE + 1);
         add_aa_span(row, coverage_to_alpha(fe - fb));
     }
     else
     {
         fb = (1 << SHIFT) - fb;
+        SkASSERT(row >= fMask.fImage);
+        SkASSERT(row + n + 1 < fMask.fImage + kMAX_STORAGE + 1);
         add_aa_span(row,  coverage_to_alpha(fb), n, coverage_to_alpha(fe),
                     (1 << (8 - SHIFT)) - (((y & MASK) + 1) >> SHIFT));
     }