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

Unified Diff: include/core/SkRect.h

Issue 50673005: Revert "Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage … (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | « include/core/SkDraw.h ('k') | src/core/SkBlitter.h » ('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 98acb1cda31731a407bfe3db63d23ccdd284a458..8bfa57a8f9f0d71b3a4b6e5fa69cb5e9571fa0d6 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -730,7 +730,7 @@ struct SK_API SkRect {
/**
* Set the dst rectangle by rounding this rectangle's coordinates to their
- * nearest integer values using SkScalarRound.
+ * nearest integer values using SkScalarRoundToInt.
*/
void round(SkIRect* dst) const {
SkASSERT(dst);
@@ -772,6 +772,15 @@ struct SK_API SkRect {
SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom));
}
+ /**
+ * Return a new SkIRect which is contains the rounded coordinates of this
+ * rect using SkScalarRoundToInt.
+ */
+ SkIRect round() const {
+ SkIRect ir;
+ this->round(&ir);
+ return ir;
+ }
/**
* Swap top/bottom or left/right if there are flipped (i.e. if width()
« no previous file with comments | « include/core/SkDraw.h ('k') | src/core/SkBlitter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698