Index: src/utils/SkDashPath.cpp |
diff --git a/src/utils/SkDashPath.cpp b/src/utils/SkDashPath.cpp |
index 0d2783eba257b35bef23ca56e7d71c8a51094bfc..cd01a9972b94695e1a4b27e1e819bb675fcb56e0 100644 |
--- a/src/utils/SkDashPath.cpp |
+++ b/src/utils/SkDashPath.cpp |
@@ -16,12 +16,11 @@ |
static SkScalar find_first_interval(const SkScalar intervals[], SkScalar phase, |
int32_t* index, int count) { |
for (int i = 0; i < count; ++i) { |
- SkScalar gap = intervals[i]; |
- if (phase > gap || (phase == gap && gap)) { |
- phase -= gap; |
+ if (phase > intervals[i]) { |
+ phase -= intervals[i]; |
} else { |
*index = i; |
- return gap - phase; |
+ return intervals[i] - phase; |
} |
} |
// If we get here, phase "appears" to be larger than our length. This |