Initialize mask to 0 during AntiRect optimization

Previously, the mask is uninitialized (which is probably caught by
MSAN) for the region to the left and right of fAntiRect when
fAntiRect is non-empty. That causes skbug.com/7192

Bug: skia:7192
Change-Id: Ida0551d00f0ac8053a1e0232cfbc4f05c9f35c6c
Reviewed-on: https://skia-review.googlesource.com/65023
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
This commit is contained in:
Yuqian Li 2017-10-30 13:04:55 -04:00 committed by Skia Commit-Bot
parent ef0c9fd3c1
commit 9e272cbdd4

View File

@ -86,6 +86,7 @@ void SkCoverageDeltaMask::convertCoverageToAlpha(bool isEvenOdd, bool isInverse,
// Blit the mask
int L = fAntiRect.fX - fBounds.fLeft;
for(int i = 0; i < fAntiRect.fHeight; ++i) {
sk_bzero(maskRow, fBounds.width());
SkAlpha* tMask = maskRow + L;
if (fAntiRect.fLeftAlpha) {
tMask[0] = fAntiRect.fLeftAlpha;