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

Unified Diff: src/core/SkRect.cpp

Issue 116183002: remove SkFP.h and replace SkFP with SkScalar stop respecting SK_SOFTWARE_FLOAT, assume its always f… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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
« src/core/SkGeometry.cpp ('K') | « src/core/SkMatrix.cpp ('k') | 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 c62f2f3cf6d35f93e4d21431fdf530670d334cf6..97de0a6a4a65b1b0633fde32d38a7096134641a0 100644
--- a/src/core/SkRect.cpp
+++ b/src/core/SkRect.cpp
@@ -78,24 +78,6 @@ bool SkRect::setBoundsCheck(const SkPoint pts[], int count) {
if (count <= 0) {
sk_bzero(this, sizeof(SkRect));
} else {
-#ifdef SK_SCALAR_SLOW_COMPARES
- int32_t l, t, r, b;
-
- l = r = SkScalarAs2sCompliment(pts[0].fX);
- t = b = SkScalarAs2sCompliment(pts[0].fY);
-
- for (int i = 1; i < count; i++) {
- int32_t x = SkScalarAs2sCompliment(pts[i].fX);
- int32_t y = SkScalarAs2sCompliment(pts[i].fY);
-
- if (x < l) l = x; else if (x > r) r = x;
- if (y < t) t = y; else if (y > b) b = y;
- }
- this->set(Sk2sComplimentAsScalar(l),
- Sk2sComplimentAsScalar(t),
- Sk2sComplimentAsScalar(r),
- Sk2sComplimentAsScalar(b));
-#else
SkScalar l, t, r, b;
l = r = pts[0].fX;
@@ -116,15 +98,12 @@ bool SkRect::setBoundsCheck(const SkPoint pts[], int count) {
if (y < t) t = y; MINMAX_ELSE if (y > b) b = y;
}
-#ifdef SK_SCALAR_IS_FLOAT
SkASSERT(!accum || !SkScalarIsFinite(accum));
if (accum) {
l = t = r = b = 0;
isFinite = false;
}
-#endif
this->set(l, t, r, b);
-#endif
}
return isFinite;
« src/core/SkGeometry.cpp ('K') | « src/core/SkMatrix.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698