Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: src/pathops/SkOpBuilder.cpp

Issue 1187273005: initialize firstDir (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase first next time Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpBuilder.cpp
diff --git a/src/pathops/SkOpBuilder.cpp b/src/pathops/SkOpBuilder.cpp
index a434fbcf2bb002120e4c619b494b9b0ec2f75c91..2fbd4f0460b7a758deea38cfc9f18780e37ffba6 100644
--- a/src/pathops/SkOpBuilder.cpp
+++ b/src/pathops/SkOpBuilder.cpp
@@ -106,7 +106,7 @@ bool SkOpBuilder::resolve(SkPath* result) {
SkPath original = *result;
int count = fOps.count();
bool allUnion = true;
- SkPathPriv::FirstDirection firstDir;
+ SkPathPriv::FirstDirection firstDir = SkPathPriv::kUnknown_FirstDirection;
for (int index = 0; index < count; ++index) {
SkPath* test = &fPathRefs[index];
if (kUnion_SkPathOp != fOps[index] || test->isInverseFillType()) {
@@ -120,7 +120,7 @@ bool SkOpBuilder::resolve(SkPath* result) {
allUnion = false;
break;
}
- if (index == 0) {
+ if (firstDir == SkPathPriv::kUnknown_FirstDirection) {
firstDir = dir;
} else if (firstDir != dir) {
SkPath temp;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698