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

Unified Diff: src/core/SkCanvas.cpp

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
« no previous file with comments | « src/animator/SkScriptTokenizer.cpp ('k') | src/core/SkCubicClipper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index feeba758fa3592bb1200116af3ef65d760af249a..dfaf65dd98ab244a266729d1b63106379b629632 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1457,13 +1457,6 @@ bool SkCanvas::quickReject(const SkPath& path) const {
}
static inline int pinIntForScalar(int x) {
caryclark 2013/12/17 13:07:13 this inline is no longer called and can be deleted
-#ifdef SK_SCALAR_IS_FIXED
- if (x < SK_MinS16) {
- x = SK_MinS16;
- } else if (x > SK_MaxS16) {
- x = SK_MaxS16;
- }
-#endif
return x;
}
@@ -1487,15 +1480,8 @@ bool SkCanvas::getClipBounds(SkRect* bounds) const {
// adjust it outwards in case we are antialiasing
const int inset = 1;
- // SkRect::iset() will correctly assert if we pass a value out of range
- // (when SkScalar==fixed), so we pin to legal values. This does not
- // really returnt the correct answer, but its the best we can do given
- // that we've promised to return SkRect (even though we support devices
- // that can be larger than 32K in width or height).
- r.iset(pinIntForScalar(ibounds.fLeft - inset),
- pinIntForScalar(ibounds.fTop - inset),
- pinIntForScalar(ibounds.fRight + inset),
- pinIntForScalar(ibounds.fBottom + inset));
+ r.iset(ibounds.fLeft - inset, ibounds.fTop - inset,
+ ibounds.fRight + inset, ibounds.fBottom + inset);
inverse.mapRect(bounds, r);
}
return true;
« no previous file with comments | « src/animator/SkScriptTokenizer.cpp ('k') | src/core/SkCubicClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698