diff options
author | 2009-07-29 20:56:52 +0000 | |
---|---|---|
committer | 2009-07-29 20:56:52 +0000 | |
commit | b6137c3139b1b1da99ad9f6c28ac0d9e8f910ff6 (patch) | |
tree | 55490b8ca035fb54db68b3aad3bb6ed2f0287c7c /src/images/SkImageDecoder.cpp | |
parent | f18d8760019ae999c63d1f0b0e6e52815202b23b (diff) |
remove auto-upscaling from base class (breaks model for allocators) but improve
the upscaling inside the png codec.
git-svn-id: http://skia.googlecode.com/svn/trunk@294 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/images/SkImageDecoder.cpp')
-rw-r--r-- | src/images/SkImageDecoder.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp index 4f9fa9bb1b..4711f89d7f 100644 --- a/src/images/SkImageDecoder.cpp +++ b/src/images/SkImageDecoder.cpp @@ -90,6 +90,7 @@ bool SkImageDecoder::allocPixelRef(SkBitmap* bitmap, } /////////////////////////////////////////////////////////////////////////////// + bool SkImageDecoder::decode(SkStream* stream, SkBitmap* bm, SkBitmap::Config pref, Mode mode) { // pass a temporary bitmap, so that if we return false, we are assured of @@ -102,17 +103,6 @@ bool SkImageDecoder::decode(SkStream* stream, SkBitmap* bm, if (!this->onDecode(stream, &tmp, pref, mode)) { return false; } - - if (tmp.config() != pref && tmp.canCopyTo(pref)) { - if (mode == kDecodeBounds_Mode) { - tmp.setConfig(pref, tmp.width(), tmp.height()); - } else if (mode == kDecodePixels_Mode) { - SkBitmap tmp2; - if (tmp.copyTo(&tmp2, pref, this->getAllocator())) { - tmp.swap(tmp2); - } - } - } bm->swap(tmp); return true; } |