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

Unified Diff: include/core/SkRect.h

Issue 731373003: change roundOut() to take a dst, so we can use that signature to return IRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | src/effects/SkGpuBlurUtils.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 91765424c71643dd2544c10406d31e221552c4ed..6bf3ffc2fc1c24241abdef72cc2c4b208ddf56e9 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -806,12 +806,14 @@ public:
* Expand this rectangle by rounding its coordinates "out", choosing the
* floor of top and left, and the ceil of right and bottom. If this rect
* is already on integer coordinates, then it will be unchanged.
+ *
+ * It is safe for this == dst
*/
- void roundOut() {
- this->set(SkScalarFloorToScalar(fLeft),
- SkScalarFloorToScalar(fTop),
- SkScalarCeilToScalar(fRight),
- SkScalarCeilToScalar(fBottom));
+ void roundOut(SkRect* dst) const {
+ dst->set(SkScalarFloorToScalar(fLeft),
+ SkScalarFloorToScalar(fTop),
+ SkScalarCeilToScalar(fRight),
+ SkScalarCeilToScalar(fBottom));
}
/**
« no previous file with comments | « no previous file | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698