Webp has_alpha is a hint only
authormsarett <msarett@google.com>
Sun, 14 Aug 2016 22:31:28 +0000 (15:31 -0700)
committerCommit bot <commit-bot@chromium.org>
Sun, 14 Aug 2016 22:31:28 +0000 (15:31 -0700)
The has_alpha bit on webps is a hint only.  We are correct to always
assume that the image may have alpha.
https://groups.google.com/a/webmproject.org/forum/#!msg/webp-discuss/2rFPKOzxuSM/uabYhmSNJAAJ

TBR=scroggo@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243153002

Review-Url: https://codereview.chromium.org/2243153002

src/codec/SkWebpCodec.cpp

index cefde2d20d147513c0549ed963c24d4bbd7a3d13..e4341421bbf8136844347aa27dbe9c90e75d2561 100644 (file)
@@ -90,9 +90,6 @@ SkCodec* SkWebpCodec::NewFromStream(SkStream* stream) {
             break;
         case 2:
             // This is the lossless format (BGRA).
-            // FIXME: Should we check the has_alpha flag here?  It looks
-            //        like the image is encoded with an alpha channel
-            //        regardless of whether or not the alpha flag is set.
             color = SkEncodedInfo::kBGRA_Color;
             alpha = SkEncodedInfo::kUnpremul_Alpha;
             break;