diff options
author | reed <reed@google.com> | 2015-06-04 14:12:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-04 14:12:25 -0700 |
commit | ad7ae6c821c530dd6cb54b0e8931ba8b10e8d87d (patch) | |
tree | 8ef2a833209c3e2c1c445232869c76a320ec1b4c /src/core/SkBitmapProcState_shaderproc.h | |
parent | a84f569f0dbf07da55d168bc56538078dd1d2c08 (diff) |
switch bitmapshader internals over to pixmap
BUG=skia:
NOTRY=True
Review URL: https://codereview.chromium.org/1158273007
Diffstat (limited to 'src/core/SkBitmapProcState_shaderproc.h')
-rw-r--r-- | src/core/SkBitmapProcState_shaderproc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/SkBitmapProcState_shaderproc.h b/src/core/SkBitmapProcState_shaderproc.h index 7a7d45ef35..2708b012b5 100644 --- a/src/core/SkBitmapProcState_shaderproc.h +++ b/src/core/SkBitmapProcState_shaderproc.h @@ -24,7 +24,7 @@ void SCALE_FILTER_NAME(const SkBitmapProcState& s, int x, int y, SkASSERT(s.fFilterLevel != kNone_SkFilterQuality); SkDEBUGCODE(CHECKSTATE(s);) - const unsigned maxX = s.fBitmap->width() - 1; + const unsigned maxX = s.fPixmap.width() - 1; const SkFixed oneX = s.fFilterOneX; const SkFixed dx = s.fInvSx; SkFixed fx; @@ -37,14 +37,14 @@ void SCALE_FILTER_NAME(const SkBitmapProcState& s, int x, int y, s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf, SkIntToScalar(y) + SK_ScalarHalf, &pt); SkFixed fy = SkScalarToFixed(pt.fY) - (s.fFilterOneY >> 1); - const unsigned maxY = s.fBitmap->height() - 1; + const unsigned maxY = s.fPixmap.height() - 1; // compute our two Y values up front subY = TILEY_LOW_BITS(fy, maxY); int y0 = TILEY_PROCF(fy, maxY); int y1 = TILEY_PROCF((fy + s.fFilterOneY), maxY); - const char* SK_RESTRICT srcAddr = (const char*)s.fBitmap->getPixels(); - size_t rb = s.fBitmap->rowBytes(); + const char* SK_RESTRICT srcAddr = (const char*)s.fPixmap.addr(); + size_t rb = s.fPixmap.rowBytes(); row0 = (const SRCTYPE*)(srcAddr + y0 * rb); row1 = (const SRCTYPE*)(srcAddr + y1 * rb); // now initialize fx |