aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPointPriv.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-05-18 12:52:22 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-18 18:11:14 +0000
commitec42e15c4d087431535443952c41696b69573b13 (patch)
tree3406a9c8a367bb8b3b8abec2785a537a27ca3ad8 /src/core/SkPointPriv.h
parentec79c39a770205910f0abd762de7e19a96c986ca (diff)
Add convenience overload of SkPointPriv::SetRectTriStrip that takes SkRect
Change-Id: Idf5bfafaf19c20f074f12d706b8b8984c5935e6d Reviewed-on: https://skia-review.googlesource.com/129185 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/core/SkPointPriv.h')
-rw-r--r--src/core/SkPointPriv.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/SkPointPriv.h b/src/core/SkPointPriv.h
index 6c8fd480a7..40c7e1043c 100644
--- a/src/core/SkPointPriv.h
+++ b/src/core/SkPointPriv.h
@@ -9,6 +9,7 @@
#define SkPointPriv_DEFINED
#include "SkPoint.h"
+#include "SkRect.h"
class SkPointPriv {
public:
@@ -127,7 +128,9 @@ public:
((SkPoint*)((intptr_t)v + 2 * stride))->set(r, t);
((SkPoint*)((intptr_t)v + 3 * stride))->set(r, b);
}
-
+ static void SetRectTriStrip(SkPoint v[], const SkRect& rect, size_t stride) {
+ SetRectTriStrip(v, rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, stride);
+ }
};
#endif