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

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 1666433003: Rename SkBitmapProcStateAutoMapper methods (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: neon build fix 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.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 71282423313dde6615e1d1edc15d4b86ff6a83c2..7c37a154d2013ef857fb9620471b2a51c393ee81 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -500,9 +500,9 @@ static void S32_D32_constX_shaderproc(const void* sIn,
// its own tiling and sampling we need to undo that here.
if (SkShader::kClamp_TileMode != s.fTileModeX ||
SkShader::kClamp_TileMode != s.fTileModeY) {
- yTemp = SkFractionalIntToInt(mapper.y() * s.fPixmap.height());
+ yTemp = SkFractionalIntToInt(mapper.fractionalIntY() * s.fPixmap.height());
} else {
- yTemp = SkFractionalIntToInt(mapper.y());
+ yTemp = mapper.intY();
}
} else {
yTemp = s.fFilterOneY + y;
@@ -530,9 +530,9 @@ static void S32_D32_constX_shaderproc(const void* sIn,
if (s.fInvType > SkMatrix::kTranslate_Mask &&
(SkShader::kClamp_TileMode != s.fTileModeX ||
SkShader::kClamp_TileMode != s.fTileModeY)) {
- iY2 = SkFractionalIntToInt(mapper.y() * s.fPixmap.height());
+ iY2 = SkFractionalIntToInt(mapper.fractionalIntY() * s.fPixmap.height());
} else {
- iY2 = SkFractionalIntToInt(mapper.y());
+ iY2 = mapper.intY();
}
switch (s.fTileModeY) {
@@ -598,8 +598,8 @@ bool SkBitmapProcState::setupForTranslate() {
// Since we know we're not filtered, we re-purpose these fields allow
// us to go from device -> src coordinates w/ just an integer add,
// rather than running through the inverse-matrix
- fFilterOneX = SkFractionalIntToInt(mapper.x());
- fFilterOneY = SkFractionalIntToInt(mapper.y());
+ fFilterOneX = mapper.intX();
+ fFilterOneY = mapper.intY();
return true;
}
@@ -781,8 +781,8 @@ void Clamp_S32_opaque_D32_nofilter_DX_shaderproc(const void* sIn, int x, int y,
{
const SkBitmapProcStateAutoMapper mapper(s, x, y);
const unsigned maxY = s.fPixmap.height() - 1;
- dstY = SkClampMax(SkFractionalIntToInt(mapper.y()), maxY);
- fx = mapper.x();
+ dstY = SkClampMax(mapper.intY(), maxY);
+ fx = mapper.fractionalIntX();
}
const SkPMColor* SK_RESTRICT src = s.fPixmap.addr32(0, dstY);
« 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