aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-06-02 13:07:26 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-02 13:07:26 -0700
commitc77392ed58ec78ab19fa0e3ff99fb8110854fba2 (patch)
tree35917d403903038c3e266f20fd14886ac22d9c98 /src/opts
parent80f709a0d7f2f1d0d35a292c0c3189d3a50b4993 (diff)
use colortype instead of config
clone of https://codereview.chromium.org/305133006/ TBR= BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/301233011
Diffstat (limited to 'src/opts')
-rw-r--r--src/opts/SkBitmapProcState_opts_SSE2.cpp6
-rw-r--r--src/opts/SkBitmapProcState_opts_SSSE3.cpp4
-rw-r--r--src/opts/SkBitmapProcState_opts_arm.cpp4
-rw-r--r--src/opts/SkBlitMask_opts_arm.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/opts/SkBitmapProcState_opts_SSE2.cpp b/src/opts/SkBitmapProcState_opts_SSE2.cpp
index 2279b9d146..1f3bbc1f8f 100644
--- a/src/opts/SkBitmapProcState_opts_SSE2.cpp
+++ b/src/opts/SkBitmapProcState_opts_SSE2.cpp
@@ -16,7 +16,7 @@ void S32_opaque_D32_filter_DX_SSE2(const SkBitmapProcState& s,
int count, uint32_t* colors) {
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fFilterLevel != SkPaint::kNone_FilterLevel);
- SkASSERT(s.fBitmap->config() == SkBitmap::kARGB_8888_Config);
+ SkASSERT(kN32_SkColorType == s.fBitmap->colorType());
SkASSERT(s.fAlphaScale == 256);
const char* srcAddr = static_cast<const char*>(s.fBitmap->getPixels());
@@ -122,7 +122,7 @@ void S32_alpha_D32_filter_DX_SSE2(const SkBitmapProcState& s,
int count, uint32_t* colors) {
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fFilterLevel != SkPaint::kNone_FilterLevel);
- SkASSERT(s.fBitmap->config() == SkBitmap::kARGB_8888_Config);
+ SkASSERT(kN32_SkColorType == s.fBitmap->colorType());
SkASSERT(s.fAlphaScale < 256);
const char* srcAddr = static_cast<const char*>(s.fBitmap->getPixels());
@@ -642,7 +642,7 @@ void S32_D16_filter_DX_SSE2(const SkBitmapProcState& s,
int count, uint16_t* colors) {
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fFilterLevel != SkPaint::kNone_FilterLevel);
- SkASSERT(s.fBitmap->config() == SkBitmap::kARGB_8888_Config);
+ SkASSERT(kN32_SkColorType == s.fBitmap->colorType());
SkASSERT(s.fBitmap->isOpaque());
SkPMColor dstColor;
diff --git a/src/opts/SkBitmapProcState_opts_SSSE3.cpp b/src/opts/SkBitmapProcState_opts_SSSE3.cpp
index 4622937c70..5b97215cc0 100644
--- a/src/opts/SkBitmapProcState_opts_SSSE3.cpp
+++ b/src/opts/SkBitmapProcState_opts_SSSE3.cpp
@@ -395,7 +395,7 @@ void S32_generic_D32_filter_DX_SSSE3(const SkBitmapProcState& s,
int count, uint32_t* colors) {
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fFilterLevel != SkPaint::kNone_FilterLevel);
- SkASSERT(s.fBitmap->config() == SkBitmap::kARGB_8888_Config);
+ SkASSERT(kN32_SkColorType == s.fBitmap->colorType());
if (has_alpha) {
SkASSERT(s.fAlphaScale < 256);
} else {
@@ -587,7 +587,7 @@ void S32_generic_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s,
int count, uint32_t* colors) {
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fFilterLevel != SkPaint::kNone_FilterLevel);
- SkASSERT(s.fBitmap->config() == SkBitmap::kARGB_8888_Config);
+ SkASSERT(kN32_SkColorType == s.fBitmap->colorType());
if (has_alpha) {
SkASSERT(s.fAlphaScale < 256);
} else {
diff --git a/src/opts/SkBitmapProcState_opts_arm.cpp b/src/opts/SkBitmapProcState_opts_arm.cpp
index c2376d42a7..ffa0ccfa8a 100644
--- a/src/opts/SkBitmapProcState_opts_arm.cpp
+++ b/src/opts/SkBitmapProcState_opts_arm.cpp
@@ -202,8 +202,8 @@ void SkBitmapProcState::platformProcs() {
justDx = true;
}
- switch (fBitmap->config()) {
- case SkBitmap::kIndex8_Config:
+ switch (fBitmap->colorType()) {
+ case kIndex_8_SkColorType:
if (justDx && SkPaint::kNone_FilterLevel == fFilterLevel) {
#if 0 /* crashing on android device */
fSampleProc16 = SI8_D16_nofilter_DX_arm;
diff --git a/src/opts/SkBlitMask_opts_arm.cpp b/src/opts/SkBlitMask_opts_arm.cpp
index a8a92ccba1..11e172c0d1 100644
--- a/src/opts/SkBlitMask_opts_arm.cpp
+++ b/src/opts/SkBlitMask_opts_arm.cpp
@@ -24,7 +24,7 @@ SkBlitMask::ColorProc SkBlitMask::PlatformColorProcs(SkColorType dstCT,
return NULL;
}
#endif
- if ((SkBitmap::kARGB_8888_Config == dstConfig) &&
+ if ((kN32_SkColorType == dstCT) &&
(SkMask::kA8_Format == maskFormat)) {
return D32_A8_Factory_neon(color);
}