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

Unified Diff: include/core/SkRect.h

Issue 2151313002: In GrShape detect that stroked axis-aligned lines are rrects. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Add accidentally delete semicolon back Created 4 years, 5 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 | « no previous file | src/gpu/GrShape.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 39cbb330f82b207cd6a508570fe41f1372353590..f25cac6e53dddc4890b61916a8fe99fefb038cb7 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -418,10 +418,9 @@ struct SK_API SkRect {
return r;
}
- static SkRect SK_WARN_UNUSED_RESULT MakeLTRB(SkScalar l, SkScalar t, SkScalar r, SkScalar b) {
- SkRect rect;
- rect.set(l, t, r, b);
- return rect;
+ static constexpr SkRect SK_WARN_UNUSED_RESULT MakeLTRB(SkScalar l, SkScalar t, SkScalar r,
+ SkScalar b) {
+ return SkRect {l, t, r, b};
}
static SkRect SK_WARN_UNUSED_RESULT MakeXYWH(SkScalar x, SkScalar y, SkScalar w, SkScalar h) {
« no previous file with comments | « no previous file | src/gpu/GrShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698