diff options
author | bsalomon <bsalomon@google.com> | 2016-07-18 07:31:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-18 07:31:13 -0700 |
commit | 0ae36a2cebf35c68c3013383d3b640f70034be55 (patch) | |
tree | c5d335bf3bc6fc898b1811fcbc810918c943a187 /include/core/SkRect.h | |
parent | 490c07d77670654ab77299323b56792bddbc053f (diff) |
In GrShape detect that stroked axis-aligned lines are rrects.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2151313002
Review-Url: https://codereview.chromium.org/2151313002
Diffstat (limited to 'include/core/SkRect.h')
-rw-r--r-- | include/core/SkRect.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/core/SkRect.h b/include/core/SkRect.h index 39cbb330f8..f25cac6e53 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) { |