aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2017-10-30 13:04:55 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-30 17:28:19 +0000
commit9e272cbdd46d851d0c097ce3a8b23ae4dc37791a (patch)
tree8bc5c2a521091cf25ea24f716f02f9e311ed405b
parentef0c9fd3c1626efef8176c0a66205a0718e9f8c2 (diff)
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>
-rw-r--r--src/core/SkCoverageDelta.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/SkCoverageDelta.cpp b/src/core/SkCoverageDelta.cpp
index b168c21872..a6bb1dd5f9 100644
--- a/src/core/SkCoverageDelta.cpp
+++ b/src/core/SkCoverageDelta.cpp
@@ -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;