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

Unified Diff: src/opts/SkBitmapProcState_matrix_neon.h

Issue 1656833002: Sampler bias for all nofilter flavors (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: 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/SkBitmapProcState_matrixProcs.cpp ('k') | src/opts/SkBitmapProcState_opts_SSE2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBitmapProcState_matrix_neon.h
diff --git a/src/opts/SkBitmapProcState_matrix_neon.h b/src/opts/SkBitmapProcState_matrix_neon.h
index fbb2a1e00b5e53834cc06f77d25b113e398bc0a6..4546f70552749b0aee506a4c14f0b87e9bc0b34f 100644
--- a/src/opts/SkBitmapProcState_matrix_neon.h
+++ b/src/opts/SkBitmapProcState_matrix_neon.h
@@ -38,13 +38,10 @@ static void SCALE_NOFILTER_NAME(const SkBitmapProcState& s,
const unsigned maxX = s.fPixmap.width() - 1;
SkFractionalInt fx;
{
- SkPoint pt;
- s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
- SkIntToScalar(y) + SK_ScalarHalf, &pt);
- fx = SkScalarToFractionalInt(pt.fY);
+ const SkBitmapProcStateAutoMapper mapper(s, x, y);
const unsigned maxY = s.fPixmap.height() - 1;
- *xy++ = TILEY_PROCF(SkFractionalIntToFixed(fx), maxY);
- fx = SkScalarToFractionalInt(pt.fX);
+ *xy++ = TILEY_PROCF(SkFractionalIntToFixed(mapper.y()), maxY);
+ fx = mapper.x();
}
if (0 == maxX) {
@@ -118,13 +115,10 @@ static void AFFINE_NOFILTER_NAME(const SkBitmapProcState& s,
SkMatrix::kAffine_Mask)) == 0);
PREAMBLE(s);
- SkPoint srcPt;
- s.fInvProc(s.fInvMatrix,
- SkIntToScalar(x) + SK_ScalarHalf,
- SkIntToScalar(y) + SK_ScalarHalf, &srcPt);
+ const SkBitmapProcStateAutoMapper mapper(s, x, y);
- SkFractionalInt fx = SkScalarToFractionalInt(srcPt.fX);
- SkFractionalInt fy = SkScalarToFractionalInt(srcPt.fY);
+ SkFractionalInt fx = mapper.x();
+ SkFractionalInt fy = mapper.y();
SkFractionalInt dx = s.fInvSxFractionalInt;
SkFractionalInt dy = s.fInvKyFractionalInt;
int maxX = s.fPixmap.width() - 1;
« no previous file with comments | « src/core/SkBitmapProcState_matrixProcs.cpp ('k') | src/opts/SkBitmapProcState_opts_SSE2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698