Index: src/images/SkImageDecoder.cpp |
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp |
index c5e973903d61a3fe25e6b4a7aaa99f1043b04335..596d05ec2dc428e3a378960be1b13070af4142dd 100644 |
--- a/src/images/SkImageDecoder.cpp |
+++ b/src/images/SkImageDecoder.cpp |
@@ -16,9 +16,6 @@ |
SkImageDecoder::SkImageDecoder() |
: fPeeker(NULL) |
-#ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER |
- , fChooser(NULL) |
-#endif |
, fAllocator(NULL) |
, fSampleSize(1) |
, fDefaultPref(kUnknown_SkColorType) |
@@ -31,9 +28,6 @@ SkImageDecoder::SkImageDecoder() |
SkImageDecoder::~SkImageDecoder() { |
SkSafeUnref(fPeeker); |
-#ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER |
- SkSafeUnref(fChooser); |
-#endif |
SkSafeUnref(fAllocator); |
} |
@@ -42,9 +36,6 @@ void SkImageDecoder::copyFieldsToOther(SkImageDecoder* other) { |
return; |
} |
other->setPeeker(fPeeker); |
-#ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER |
- other->setChooser(fChooser); |
-#endif |
other->setAllocator(fAllocator); |
other->setSampleSize(fSampleSize); |
other->setPreserveSrcDepth(fPreserveSrcDepth); |
@@ -97,13 +88,6 @@ SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker* peeker) { |
return peeker; |
} |
-#ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER |
-SkImageDecoder::Chooser* SkImageDecoder::setChooser(Chooser* chooser) { |
- SkRefCnt_SafeAssign(fChooser, chooser); |
- return chooser; |
-} |
-#endif |
- |
SkBitmap::Allocator* SkImageDecoder::setAllocator(SkBitmap::Allocator* alloc) { |
SkRefCnt_SafeAssign(fAllocator, alloc); |
return alloc; |
@@ -116,21 +100,6 @@ void SkImageDecoder::setSampleSize(int size) { |
fSampleSize = size; |
} |
-#ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER |
-// TODO: change Chooser virtual to take colorType, so we can stop calling SkColorTypeToBitmapConfig |
-// |
-bool SkImageDecoder::chooseFromOneChoice(SkColorType colorType, int width, int height) const { |
- Chooser* chooser = fChooser; |
- |
- if (NULL == chooser) { // no chooser, we just say YES to decoding :) |
- return true; |
- } |
- chooser->begin(1); |
- chooser->inspect(0, SkColorTypeToBitmapConfig(colorType), width, height); |
- return chooser->choose() == 0; |
-} |
-#endif |
- |
bool SkImageDecoder::allocPixelRef(SkBitmap* bitmap, |
SkColorTable* ctable) const { |
return bitmap->tryAllocPixels(fAllocator, ctable); |