Index: src/images/SkImageDecoder.cpp |
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp |
index 0e2018c11768c9a646926f354aba0eb1ad7f3d1e..ed2ad164a11aea72d8b171b42c084fb813eeb1aa 100644 |
--- a/src/images/SkImageDecoder.cpp |
+++ b/src/images/SkImageDecoder.cpp |
@@ -24,9 +24,6 @@ SkImageDecoder::SkImageDecoder() |
, fDefaultPref(kUnknown_SkColorType) |
, fPreserveSrcDepth(false) |
, fDitherImage(true) |
-#ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG |
- , fUsePrefTable(false) |
-#endif |
, fSkipWritingZeroes(false) |
, fPreferQualityOverSpeed(false) |
, fRequireUnpremultipliedColors(false) { |
@@ -50,13 +47,6 @@ void SkImageDecoder::copyFieldsToOther(SkImageDecoder* other) { |
#endif |
other->setAllocator(fAllocator); |
other->setSampleSize(fSampleSize); |
-#ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG |
- if (fUsePrefTable) { |
- other->setPrefConfigTable(fPrefTable); |
- } else { |
- other->fDefaultPref = fDefaultPref; |
- } |
-#endif |
other->setPreserveSrcDepth(fPreserveSrcDepth); |
other->setDitherImage(fDitherImage); |
other->setSkipWritingZeroes(fSkipWritingZeroes); |
@@ -148,38 +138,8 @@ bool SkImageDecoder::allocPixelRef(SkBitmap* bitmap, |
/////////////////////////////////////////////////////////////////////////////// |
-#ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG |
-void SkImageDecoder::setPrefConfigTable(const PrefConfigTable& prefTable) { |
- fUsePrefTable = true; |
- fPrefTable = prefTable; |
-} |
-#endif |
- |
-// TODO: use colortype in fPrefTable, fDefaultPref so we can stop using SkBitmapConfigToColorType() |
-// |
SkColorType SkImageDecoder::getPrefColorType(SrcDepth srcDepth, bool srcHasAlpha) const { |
SkColorType ct = fDefaultPref; |
-#ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG |
- if (fUsePrefTable) { |
- // Until we kill or change the PrefTable, we have to go into Config land for a moment. |
- SkBitmap::Config config = SkBitmap::kNo_Config; |
- switch (srcDepth) { |
- case kIndex_SrcDepth: |
- config = srcHasAlpha ? fPrefTable.fPrefFor_8Index_YesAlpha_src |
- : fPrefTable.fPrefFor_8Index_NoAlpha_src; |
- break; |
- case k8BitGray_SrcDepth: |
- config = fPrefTable.fPrefFor_8Gray_src; |
- break; |
- case k32Bit_SrcDepth: |
- config = srcHasAlpha ? fPrefTable.fPrefFor_8bpc_YesAlpha_src |
- : fPrefTable.fPrefFor_8bpc_NoAlpha_src; |
- break; |
- } |
- // now return to SkColorType land |
- ct = SkBitmapConfigToColorType(config); |
- } |
-#endif |
if (fPreserveSrcDepth) { |
switch (srcDepth) { |
case kIndex_SrcDepth: |