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

Unified Diff: src/core/SkBitmapProcState_matrixProcs.cpp

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.cpp ('k') | src/opts/SkBitmapProcState_matrix_neon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState_matrixProcs.cpp
diff --git a/src/core/SkBitmapProcState_matrixProcs.cpp b/src/core/SkBitmapProcState_matrixProcs.cpp
index 1c4b7b6bcf4c1b9f79834f8a7889e6ed12d6a7e9..d7457ec53bd0a81191fe5683c191cbdf4062ac33 100644
--- a/src/core/SkBitmapProcState_matrixProcs.cpp
+++ b/src/core/SkBitmapProcState_matrixProcs.cpp
@@ -328,14 +328,11 @@ static void fill_sequential(uint16_t xptr[], int start, int count) {
static int nofilter_trans_preamble(const SkBitmapProcState& s, uint32_t** xy,
int x, int y) {
- SkPoint pt;
- s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
- SkIntToScalar(y) + SK_ScalarHalf, &pt);
- **xy = s.fIntTileProcY(SkScalarToFixed(pt.fY) >> 16,
- s.fPixmap.height());
+ const SkBitmapProcStateAutoMapper mapper(s, x, y);
+ **xy = s.fIntTileProcY(SkFractionalIntToInt(mapper.y()), s.fPixmap.height());
*xy += 1; // bump the ptr
// return our starting X position
- return SkScalarToFixed(pt.fX) >> 16;
+ return SkFractionalIntToInt(mapper.x());
}
static void clampx_nofilter_trans(const SkBitmapProcState& s,
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/opts/SkBitmapProcState_matrix_neon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698