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

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 1531423003: Revert of Repeating SkBitmapProcState rounding bias (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years 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.h ('k') | src/core/SkBitmapProcState_matrix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState.cpp
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index 6ed83002d9008f448a278e71f93eb9c2ab79ba33..487bd80402609f454b894e5e124eb5d8eb20c9eb 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -820,10 +820,15 @@
SkFractionalInt fx;
int dstY;
{
- const SkBitmapProcStateAutoMapper mapper(s, x, y);
+ SkPoint pt;
+ s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf, SkIntToScalar(y) + SK_ScalarHalf,
+ &pt);
+ fx = SkScalarToFractionalInt(pt.fY)
+ + bitmap_sampler_inv_bias(s.fInvMatrix.getScaleY());
const unsigned maxY = s.fPixmap.height() - 1;
- dstY = SkClampMax(SkFixedFloorToInt(mapper.y()), maxY);
- fx = SkFixedToFractionalInt(mapper.x());
+ dstY = SkClampMax(SkFractionalIntToInt(fx), maxY);
+ fx = SkScalarToFractionalInt(pt.fX)
+ + bitmap_sampler_inv_bias(s.fInvMatrix.getScaleX());
}
const SkPMColor* SK_RESTRICT src = s.fPixmap.addr32(0, dstY);
@@ -859,3 +864,4 @@
}
}
}
+
« no previous file with comments | « src/core/SkBitmapProcState.h ('k') | src/core/SkBitmapProcState_matrix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698