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

Unified Diff: src/core/SkBitmapProcState_shaderproc.h

Issue 1158273007: switch bitmapshader internals over to pixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix neon/mips to use pixmpas Created 5 years, 6 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_sample.h ('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_shaderproc.h
diff --git a/src/core/SkBitmapProcState_shaderproc.h b/src/core/SkBitmapProcState_shaderproc.h
index 7a7d45ef3553d68008cfa424915be2b7103c7366..2708b012b5462f14c691ef9f8aa48c9729d80a5a 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
« no previous file with comments | « src/core/SkBitmapProcState_sample.h ('k') | src/opts/SkBitmapProcState_matrix_neon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698