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

Unified Diff: src/ports/SkImageDecoder_WIC.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/ports/SkImageDecoder_WIC.cpp
diff --git a/src/ports/SkImageDecoder_WIC.cpp b/src/ports/SkImageDecoder_WIC.cpp
index c3666aca5cd34068df6f92f8f15b8e483038cbd5..1bda67fe91d86861db18443fde8038622e7fb434 100644
--- a/src/ports/SkImageDecoder_WIC.cpp
+++ b/src/ports/SkImageDecoder_WIC.cpp
@@ -240,7 +240,9 @@ bool SkImageDecoder_WIC::decodeStream(SkStream* stream, SkBitmap* bm, WICModes w
);
// Note: we don't need to premultiply here since we specified PBGRA
- bm->computeAndSetOpaquePredicate();
+ if (ComputeIsOpaque(*bm)) {
+ bm->setAlphaType(kOpaque_SkAlphaType);
+ }
}
return SUCCEEDED(hr);

Powered by Google App Engine
This is Rietveld 408576698