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

Unified Diff: src/images/SkImageDecoder_libbmp.cpp

Issue 17620004: Remove bitmap reuse from SkImageDecoder. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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
Index: src/images/SkImageDecoder_libbmp.cpp
diff --git a/src/images/SkImageDecoder_libbmp.cpp b/src/images/SkImageDecoder_libbmp.cpp
index 5c2299b77cc138611fe058724ad55cf6957fe638..14b9090f9bb5bfd13562fd5bafb8ad93df4bbbdb 100644
--- a/src/images/SkImageDecoder_libbmp.cpp
+++ b/src/images/SkImageDecoder_libbmp.cpp
@@ -130,18 +130,12 @@ bool SkBMPImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {
SkScaledBitmapSampler sampler(width, height, getSampleSize());
+ bm->setConfig(config, sampler.scaledWidth(), sampler.scaledHeight());
+ bm->setIsOpaque(true);
+
if (justBounds) {
- bm->setConfig(config, sampler.scaledWidth(), sampler.scaledHeight());
- bm->setIsOpaque(true);
return true;
}
- // No Bitmap reuse supported for this format
- if (!bm->isNull()) {
- return false;
- }
-
- bm->setConfig(config, sampler.scaledWidth(), sampler.scaledHeight());
- bm->setIsOpaque(true);
if (!this->allocPixelRef(bm, NULL)) {
return false;

Powered by Google App Engine
This is Rietveld 408576698