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

Unified Diff: src/core/SkRect.cpp

Issue 1032273003: remove #if 0 code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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/core/SkRect.cpp
diff --git a/src/core/SkRect.cpp b/src/core/SkRect.cpp
index 2c973a1ef29cd870a46f90c2182b7b71eea10a78..aa2103c638e75644237b625dcfe0f22ae9de69c5 100644
--- a/src/core/SkRect.cpp
+++ b/src/core/SkRect.cpp
@@ -61,40 +61,6 @@ bool SkRect::setBoundsCheck(const SkPoint pts[], int count) {
if (count <= 0) {
sk_bzero(this, sizeof(SkRect));
} else {
-#if 0
- SkScalar l, t, r, b;
-
- l = r = pts[0].fX;
- t = b = pts[0].fY;
-
- // If all of the points are finite, accum should stay 0. If we encounter
- // a NaN or infinity, then accum should become NaN.
- float accum = 0;
- accum *= l; accum *= t;
-
- for (int i = 1; i < count; i++) {
- SkScalar x = pts[i].fX;
- SkScalar y = pts[i].fY;
-
- accum *= x; accum *= y;
-
- // we use if instead of if/else, so we can generate min/max
- // float instructions (at least on SSE)
- if (x < l) l = x;
- if (x > r) r = x;
-
- if (y < t) t = y;
- if (y > b) b = y;
- }
-
- SkASSERT(!accum || !SkScalarIsFinite(accum));
- accum = 0;
- if (accum) {
- l = t = r = b = 0;
- isFinite = false;
- }
- this->set(l, t, r, b);
-#else
Sk4f min, max, accum;
if (count & 1) {
@@ -134,9 +100,7 @@ bool SkRect::setBoundsCheck(const SkPoint pts[], int count) {
this->setEmpty();
isFinite = false;
}
-#endif
}
-
return isFinite;
}
« 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