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

Unified Diff: src/images/SkImageDecoder.cpp

Issue 17620004: Remove bitmap reuse from SkImageDecoder. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add documentation. Created 7 years, 6 months 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_libbmp.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 38aa7fda0d143a2134d89253c179f46781bb1f30..0aa752e38f937cff246d2bf6415f070b169cd026 100644
--- a/src/images/SkImageDecoder.cpp
+++ b/src/images/SkImageDecoder.cpp
@@ -164,19 +164,12 @@ SkBitmap::Config SkImageDecoder::getPrefConfig(SrcDepth srcDepth,
}
bool SkImageDecoder::decode(SkStream* stream, SkBitmap* bm,
- SkBitmap::Config pref, Mode mode, bool reuseBitmap) {
+ SkBitmap::Config pref, Mode mode) {
// we reset this to false before calling onDecode
fShouldCancelDecode = false;
// assign this, for use by getPrefConfig(), in case fUsePrefTable is false
fDefaultPref = pref;
- if (reuseBitmap) {
- SkAutoLockPixels alp(*bm);
- if (NULL != bm->getPixels()) {
- return this->onDecode(stream, bm, mode);
- }
- }
-
// pass a temporary bitmap, so that if we return false, we are assured of
// leaving the caller's bitmap untouched.
SkBitmap tmp;
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | src/images/SkImageDecoder_libbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698