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

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, 2 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 8bb716bae82a40807c0a759a8fcf0bc22ba357fc..68014dd39247f0c663305584ad62ffde7ee978e7 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);
scroggo 2013/10/18 19:32:40 This should check RequireUnpremultiplied
}
bool SkWEBPImageDecoder::onBuildTileIndex(SkStreamRewindable* stream,

Powered by Google App Engine
This is Rietveld 408576698