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

Unified Diff: src/effects/gradients/SkClampRange.cpp

Issue 243563002: remove unused fOverflowed from SkClampRange (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | « src/effects/gradients/SkClampRange.h ('k') | tests/ClampRangeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkClampRange.cpp
diff --git a/src/effects/gradients/SkClampRange.cpp b/src/effects/gradients/SkClampRange.cpp
index 3e2ca8e9320168f4da759d4b7758a09917f90f64..398b02434fd531ac137d69abd8ab18aa84273c0a 100644
--- a/src/effects/gradients/SkClampRange.cpp
+++ b/src/effects/gradients/SkClampRange.cpp
@@ -50,7 +50,6 @@ void SkClampRange::init(SkFixed fx0, SkFixed dx0, int count, int v0, int v1) {
fV0 = v0;
fV1 = v1;
- fOverflowed = false;
// special case 1 == count, as it is slightly common for skia
// and avoids us ever calling divide or 64bit multiply
@@ -63,7 +62,6 @@ void SkClampRange::init(SkFixed fx0, SkFixed dx0, int count, int v0, int v1) {
int64_t dx = dx0;
// start with ex equal to the last computed value
int64_t ex = fx + (count - 1) * dx;
- fOverflowed = overflows_fixed(ex);
if ((uint64_t)(fx | ex) <= 0xFFFF) {
fCount0 = fCount2 = 0;
@@ -86,9 +84,8 @@ void SkClampRange::init(SkFixed fx0, SkFixed dx0, int count, int v0, int v1) {
// now make ex be 1 past the last computed value
ex += dx;
- fOverflowed = overflows_fixed(ex);
// now check for over/under flow
- if (fOverflowed) {
+ if (overflows_fixed(ex)) {
int originalCount = count;
int64_t ccount;
bool swap = dx < 0;
« no previous file with comments | « src/effects/gradients/SkClampRange.h ('k') | tests/ClampRangeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698