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

Unified Diff: tests/ClampRangeTest.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.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ClampRangeTest.cpp
diff --git a/tests/ClampRangeTest.cpp b/tests/ClampRangeTest.cpp
index b8059bc485ef9ff3254ec4985259faa786bdd0bf..28fcffc5e729454b15ae7b20c51070a66525c05e 100644
--- a/tests/ClampRangeTest.cpp
+++ b/tests/ClampRangeTest.cpp
@@ -50,33 +50,24 @@ static void slow_check(const SkClampRange& range,
SkFixed fx, SkFixed dx, int count) {
SkASSERT(range.fCount0 + range.fCount1 + range.fCount2 == count);
- int i;
- if (range.fOverflowed) {
- fx = range.fFx1;
- for (i = 0; i < range.fCount1; i++) {
- R_ASSERT(fx >= 0 && fx <= 0xFFFF);
- fx += dx;
- }
- } else {
- for (i = 0; i < range.fCount0; i++) {
- int v = classify_value(fx, V0, V1);
- R_ASSERT(v == range.fV0);
- fx += dx;
- }
- if (range.fCount1 > 0 && fx != range.fFx1) {
- SkDebugf("%x %x\n", fx, range.fFx1);
- R_ASSERT(false); // bad fFx1
- return;
- }
- for (i = 0; i < range.fCount1; i++) {
- R_ASSERT(fx >= 0 && fx <= 0xFFFF);
- fx += dx;
- }
- for (i = 0; i < range.fCount2; i++) {
- int v = classify_value(fx, V0, V1);
- R_ASSERT(v == range.fV1);
- fx += dx;
- }
+ for (int i = 0; i < range.fCount0; i++) {
+ int v = classify_value(fx, V0, V1);
+ R_ASSERT(v == range.fV0);
+ fx += dx;
+ }
+ if (range.fCount1 > 0 && fx != range.fFx1) {
+ SkDebugf("%x %x\n", fx, range.fFx1);
+ R_ASSERT(false); // bad fFx1
+ return;
+ }
+ for (int i = 0; i < range.fCount1; i++) {
+ R_ASSERT(fx >= 0 && fx <= 0xFFFF);
+ fx += dx;
+ }
+ for (int i = 0; i < range.fCount2; i++) {
+ int v = classify_value(fx, V0, V1);
+ R_ASSERT(v == range.fV1);
+ fx += dx;
}
}
« no previous file with comments | « src/effects/gradients/SkClampRange.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698