Initialize some more variables in SpotShadowTessellator
authorJim Van Verth <jvanverth@google.com>
Fri, 3 Feb 2017 14:22:37 +0000 (09:22 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Fri, 3 Feb 2017 15:29:37 +0000 (15:29 +0000)
BUG=skia:6119

Change-Id: Id3a3042df6254e3367713b82f3b08257e0be71b1
Reviewed-on: https://skia-review.googlesource.com/7992
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

src/utils/SkShadowTessellator.cpp

index 18cae11..f140ceb 100755 (executable)
@@ -452,7 +452,10 @@ SkSpotShadowTessellator::SkSpotShadowTessellator(const SkPath& path,
     , fUmbraColor(umbraColor)
     , fPenumbraColor(penumbraColor)
     , fTransparent(transparent)
+    , fValidUmbra(true)
     , fPrevUmbraIndex(-1)
+    , fCurrPolyPoint(0)
+    , fPrevUmbraOutside(false)
     , fFirstUmbraOutside(false) {
 
     // TODO: calculate these better
@@ -481,7 +484,6 @@ SkSpotShadowTessellator::SkSpotShadowTessellator(const SkPath& path,
     // check to see if we have a valid umbra at all
     bool usePointCheck = path.isRRect(nullptr) || path.isRect(nullptr) || path.isOval(nullptr);
     this->checkUmbraAndTransformCentroid(scale, translate, usePointCheck);
-    fPrevUmbraOutside = false;
 
     // walk around the path, tessellate and generate inner and outer rings
     SkPath::Iter iter(path, true);