diff options
author | reed <reed@chromium.org> | 2014-08-18 08:13:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-18 08:13:03 -0700 |
commit | bbe7a2ad32e3b54dbfa86d6de2ccf57526a10e2f (patch) | |
tree | 17331ed486808514f9eafec4b37f03a430481ba1 /src/images | |
parent | ad77e55cc0a29fa2d5cb76077d2e4139a7ebabff (diff) |
eliminate code related to SkBitmap::Config
BUG=skia:
R=reed@google.com, mike@reedtribe.org
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/483593002
Diffstat (limited to 'src/images')
-rw-r--r-- | src/images/SkImageDecoder.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp index 0e2018c117..ed2ad164a1 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: |