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

Unified Diff: include/core/SkRect.h

Issue 1544873002: handle halfway case in scan converter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add more comments Created 4 years, 12 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 | « gm/composeshader.cpp ('k') | src/core/SkScan_Path.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRect.h
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index fe276e6710b0d242a0b96de66eb22d87f7e7c015..4f649b7c7325efcb82872f329eb83ac25d614198 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -825,24 +825,6 @@ public:
}
/**
- * Variant of round() that explicitly performs the rounding step (i.e. floor(x + 0.5)) using
- * double instead of SkScalar (float). It does this by calling SkDScalarRoundToInt(), which
- * may be slower than calling SkScalarRountToInt(), but gives slightly more accurate results.
- *
- * e.g.
- * SkScalar x = 0.49999997f;
- * int ix = SkScalarRoundToInt(x);
- * SkASSERT(0 == ix); // <--- fails
- * ix = SkDScalarRoundToInt(x);
- * SkASSERT(0 == ix); // <--- succeeds
- */
- void dround(SkIRect* dst) const {
- SkASSERT(dst);
- dst->set(SkDScalarRoundToInt(fLeft), SkDScalarRoundToInt(fTop),
- SkDScalarRoundToInt(fRight), SkDScalarRoundToInt(fBottom));
- }
-
- /**
* Set the dst rectangle by rounding "out" this rectangle, choosing the
* SkScalarFloor of top and left, and the SkScalarCeil of right and bottom.
*/
« no previous file with comments | « gm/composeshader.cpp ('k') | src/core/SkScan_Path.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698