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

Unified Diff: src/core/SkScan_Hairline.cpp

Issue 1650653002: SkNx Load/store: take any pointer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: simplify call sites Created 4 years, 11 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 | « src/core/SkRect.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScan_Hairline.cpp
diff --git a/src/core/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp
index efccfc9ee82e6e6e554881bcef879a262d4c7085..a63220efef46e29d94bc6ab7d0a6288b9e48f2fc 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);
}
« no previous file with comments | « src/core/SkRect.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698