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

Unified Diff: src/images/SkImageDecoder_libwebp.cpp

Issue 25275004: store SkAlphaType inside SkBitmap, on road to support unpremul (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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_libwebp.cpp
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp
index 625e96e42b7d16c3b7c8edbb4a24ae480f433a60..3373c033d0c710de1825f4fed1d541440bfe742b 100644
--- a/src/images/SkImageDecoder_libwebp.cpp
+++ b/src/images/SkImageDecoder_libwebp.cpp
@@ -293,11 +293,8 @@ bool SkWEBPImageDecoder::setDecodeConfig(SkBitmap* decodedBitmap,
return false;
}
- decodedBitmap->setConfig(config, width, height, 0);
-
- decodedBitmap->setIsOpaque(!fHasAlpha);
-
- return true;
+ return decodedBitmap->setConfig(config, width, height, 0,
+ fHasAlpha ? kPremul_SkAlphaType : kOpaque_SkAlphaType);
}
bool SkWEBPImageDecoder::onBuildTileIndex(SkStreamRewindable* stream,

Powered by Google App Engine
This is Rietveld 408576698