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

Unified Diff: src/opts/SkBitmapProcState_opts_arm.cpp

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/opts/SkBitmapProcState_opts_SSSE3.cpp ('k') | src/opts/SkBitmapProcState_opts_mips_dsp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBitmapProcState_opts_arm.cpp
diff --git a/src/opts/SkBitmapProcState_opts_arm.cpp b/src/opts/SkBitmapProcState_opts_arm.cpp
index e6799dea1952e8031e1dfbe34f67638e6778850f..bd67ba4fd7ff93fa64514bc399a331310475d62e 100644
--- a/src/opts/SkBitmapProcState_opts_arm.cpp
+++ b/src/opts/SkBitmapProcState_opts_arm.cpp
@@ -30,18 +30,17 @@ void SI8_D16_nofilter_DX_arm(const SkBitmapProcState& s,
SkASSERT(s.fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask));
SkASSERT(kNone_SkFilterQuality == s.fFilterLevel);
- const uint16_t* SK_RESTRICT table = s.fBitmap->getColorTable()->read16BitCache();
- const uint8_t* SK_RESTRICT srcAddr = (const uint8_t*)s.fBitmap->getPixels();
+ const uint16_t* SK_RESTRICT table = s.fPixmap.ctable()->read16BitCache();
+ const uint8_t* SK_RESTRICT srcAddr = (const uint8_t*)s.fPixmap.addr();
// buffer is y32, x16, x16, x16, x16, x16
// bump srcAddr to the proper row, since we're told Y never changes
- SkASSERT((unsigned)xy[0] < (unsigned)s.fBitmap->height());
- srcAddr = (const uint8_t*)((const char*)srcAddr +
- xy[0] * s.fBitmap->rowBytes());
+ SkASSERT((unsigned)xy[0] < (unsigned)s.fPixmap.height());
+ srcAddr = (const uint8_t*)((const char*)srcAddr + xy[0] * s.fPixmap.rowBytes());
uint8_t src;
- if (1 == s.fBitmap->width()) {
+ if (1 == s.fPixmap.width()) {
src = srcAddr[0];
uint16_t dstValue = table[src];
sk_memset16(colors, dstValue, count);
@@ -119,15 +118,15 @@ void SI8_opaque_D32_nofilter_DX_arm(const SkBitmapProcState& s,
SkASSERT(s.fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask));
SkASSERT(kNone_SkFilterQuality == s.fFilterLevel);
- const SkPMColor* SK_RESTRICT table = s.fBitmap->getColorTable()->readColors();
- const uint8_t* SK_RESTRICT srcAddr = (const uint8_t*)s.fBitmap->getPixels();
+ const SkPMColor* SK_RESTRICT table = s.fPixmap.ctable()->readColors();
+ const uint8_t* SK_RESTRICT srcAddr = (const uint8_t*)s.fPixmap.addr();
// buffer is y32, x16, x16, x16, x16, x16
// bump srcAddr to the proper row, since we're told Y never changes
- SkASSERT((unsigned)xy[0] < (unsigned)s.fBitmap->height());
- srcAddr = (const uint8_t*)((const char*)srcAddr + xy[0] * s.fBitmap->rowBytes());
+ SkASSERT((unsigned)xy[0] < (unsigned)s.fPixmap.height());
+ srcAddr = (const uint8_t*)((const char*)srcAddr + xy[0] * s.fPixmap.rowBytes());
- if (1 == s.fBitmap->width()) {
+ if (1 == s.fPixmap.width()) {
uint8_t src = srcAddr[0];
SkPMColor dstValue = table[src];
sk_memset32(colors, dstValue, count);
@@ -199,7 +198,7 @@ void SkBitmapProcState::platformProcs() {
justDx = true;
}
- switch (fBitmap->colorType()) {
+ switch (fPixmap.colorType()) {
case kIndex_8_SkColorType:
if (justDx && kNone_SkFilterQuality == fFilterLevel) {
#if 0 /* crashing on android device */
« no previous file with comments | « src/opts/SkBitmapProcState_opts_SSSE3.cpp ('k') | src/opts/SkBitmapProcState_opts_mips_dsp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698