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

Unified Diff: include/core/SkRect.h

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (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
Index: include/core/SkRect.h
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index 8bfa57a8f9f0d71b3a4b6e5fa69cb5e9571fa0d6..0a5439cdfc771d231e49800bc736449c83be68b5 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -436,7 +436,6 @@ struct SK_API SkRect {
* returns false.
*/
bool isFinite() const {
-#ifdef SK_SCALAR_IS_FLOAT
float accum = 0;
accum *= fLeft;
accum *= fTop;
@@ -449,13 +448,6 @@ struct SK_API SkRect {
// value==value will be true iff value is not NaN
// TODO: is it faster to say !accum or accum==accum?
return accum == accum;
-#else
- // use bit-or for speed, since we don't care about short-circuting the
- // tests, and we expect the common case will be that we need to check all.
- int isNaN = (SK_FixedNaN == fLeft) | (SK_FixedNaN == fTop) |
- (SK_FixedNaN == fRight) | (SK_FixedNaN == fBottom);
- return !isNaN;
-#endif
}
SkScalar x() const { return fLeft; }
« no previous file with comments | « include/core/SkPreConfig.h ('k') | include/core/SkScalar.h » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698