aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleHT.cpp
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2017-11-08 11:44:31 -0500
committerGravatar Ravi Mistry <rmistry@google.com>2017-11-08 18:25:17 +0000
commitdf429f3beac1c191289ba1e3bd918bf84df57bf5 (patch)
tree65f7f049b218ef8984d054524c05dd3fcea392a3 /samplecode/SampleHT.cpp
parent21ad53fd8839af82bcb11da6ab3e256ee7752f2b (diff)
move parts of SkPoint to SkPointPriv
Move specialized SkPoint methods to SkPointPriv. Use constexpr and inline initialization where possible. R=reed@google.com,bsalomon@google.com Bug: skia: 6898 Change-Id: I01ec5186f010f2dc80c068c70d9cc352f3221338 Reviewed-on: https://skia-review.googlesource.com/68700 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ravi Mistry <rmistry@google.com>
Diffstat (limited to 'samplecode/SampleHT.cpp')
-rw-r--r--samplecode/SampleHT.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/samplecode/SampleHT.cpp b/samplecode/SampleHT.cpp
index 50ea2875ec..e1483bef2c 100644
--- a/samplecode/SampleHT.cpp
+++ b/samplecode/SampleHT.cpp
@@ -12,6 +12,7 @@
#include "SkDrawable.h"
#include "SkInterpolator.h"
#include "SkPictureRecorder.h"
+#include "SkPointPriv.h"
#include "SkRandom.h"
const SkRect gUnitSquare = { -1, -1, 1, 1 };
@@ -35,7 +36,7 @@ static bool oval_contains(const SkRect& r, SkScalar x, SkScalar y) {
m.setRectToRect(r, gUnitSquare, SkMatrix::kFill_ScaleToFit);
SkPoint pt;
m.mapXY(x, y, &pt);
- return pt.lengthSqd() <= 1;
+ return SkPointPriv::LengthSqd(pt) <= 1;
}
static SkColor rand_opaque_color(uint32_t seed) {