aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScan_Hairline.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-01-31 08:02:47 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-31 08:02:47 -0800
commit507ef6d68115ae9e6d884bb36436a1463523d893 (patch)
tree67a2aabdf43f8dab134b2f08240d511dd1113af1 /src/core/SkScan_Hairline.cpp
parentb1c32b7bde01e74ea59a9c0182c47cef862ef1c5 (diff)
SkNx Load/store: take any pointer.
This means we can remove a lot of explicit casts in code that uses SkNx. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1650653002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1650653002
Diffstat (limited to 'src/core/SkScan_Hairline.cpp')
-rw-r--r--src/core/SkScan_Hairline.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp
index efccfc9ee8..a63220efef 100644
--- a/src/core/SkScan_Hairline.cpp
+++ b/src/core/SkScan_Hairline.cpp
@@ -233,7 +233,7 @@ static void hairquad(const SkPoint pts[3], const SkRegion* clip,
Sk2s C = coeff.fC;
for (int i = 1; i < lines; ++i) {
t = t + dt;
- ((A * t + B) * t + C).store(&tmp[i].fX);
+ ((A * t + B) * t + C).store(&tmp[i]);
}
tmp[lines] = pts[2];
lineproc(tmp, lines + 1, clip, blitter);
@@ -310,7 +310,7 @@ static void hair_cubic(const SkPoint pts[4], const SkRegion* clip, SkBlitter* bl
Sk2s D = coeff.fD;
for (int i = 1; i < lines; ++i) {
t = t + dt;
- (((A * t + B) * t + C) * t + D).store(&tmp[i].fX);
+ (((A * t + B) * t + C) * t + D).store(&tmp[i]);
}
tmp[lines] = pts[3];
lineproc(tmp, lines + 1, clip, blitter);
@@ -319,10 +319,10 @@ static void hair_cubic(const SkPoint pts[4], const SkRegion* clip, SkBlitter* bl
static SkRect compute_nocheck_cubic_bounds(const SkPoint pts[4]) {
SkASSERT(SkScalarsAreFinite(&pts[0].fX, 8));
- Sk2s min = Sk2s::Load(&pts[0].fX);
+ Sk2s min = Sk2s::Load(pts);
Sk2s max = min;
for (int i = 1; i < 4; ++i) {
- Sk2s pair = Sk2s::Load(&pts[i].fX);
+ Sk2s pair = Sk2s::Load(pts+i);
min = Sk2s::Min(min, pair);
max = Sk2s::Max(max, pair);
}