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

Unified Diff: src/images/SkImageDecoder.cpp

Issue 816273002: remove dead SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « include/core/SkImageDecoder.h ('k') | src/images/SkImageDecoder_astc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | src/images/SkImageDecoder_astc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698