fix mask error for BW text, where I forgot to look at just the low-8 bits
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 27 Mar 2013 15:08:23 +0000 (15:08 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 27 Mar 2013 15:08:23 +0000 (15:08 +0000)
of the right mask when computing the number of "full" runs.

possibly related to crbug.com/178796
Review URL: https://codereview.chromium.org/13044012

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

src/core/SkBlitBWMaskTemplate.h

index fa25274427dde70de60d618e690accdb6004f99b..00d2326bfff8f85432afba1bb11f0d0096261b3d 100644 (file)
@@ -63,6 +63,7 @@ static void SK_BLITBWMASK_NAME(const SkBitmap& bitmap, const SkMask& srcMask, co
 
         int left_mask = 0xFF >> (left_edge & 7);
         int rite_mask = 0xFF << (8 - (rite_edge & 7));
+        rite_mask &= 0xFF;  // only want low-8 bits of mask
         int full_runs = (rite_edge >> 3) - ((left_edge + 7) >> 3);
 
         // check for empty right mask, so we don't read off the end (or go slower than we need to)