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

Unified Diff: src/codec/SkBmpCodec.cpp

Issue 1689183002: Clarify bmp comment about when we support the alpha mask (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpCodec.cpp
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp
index 3302e4f752eb74826b6142d1d3e04535e393f816..4828f7f7e285bb51bc657cefac71d76b8cfea54a 100644
--- a/src/codec/SkBmpCodec.cpp
+++ b/src/codec/SkBmpCodec.cpp
@@ -373,9 +373,13 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) {
// of the image to use the alpha channels. However, many of these images
// leave the alpha channel blank and expect to be rendered as opaque. This
// is the case for almost all V3 images, so we render these as opaque. For
- // V4+, we will use the alpha channel, and fix the image later if it turns
- // out to be fully transparent.
- // As an exception, V3 bmp-in-ico may use an alpha mask.
+ // V4+ images in kMask mode, we will use the alpha mask.
+ //
+ // skbug.com/4116: We should perhaps also apply the alpha mask in kStandard
+ // mode. We just haven't seen any images that expect this
+ // behavior.
+ //
+ // Additionally, V3 bmp-in-ico may use the alpha mask.
SkAlphaType alphaType = kOpaque_SkAlphaType;
if ((kInfoV3_BmpHeaderType == headerType && inIco) ||
kInfoV4_BmpHeaderType == headerType ||
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698