Chromium Code Reviews| Index: third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.h |
| diff --git a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.h b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.h |
| index c5bf44b401205a428dcf0f7e6aa4460a2c2221d1..056d7c3bb9adf083fbadb351af2797d5348c7086 100644 |
| --- a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.h |
| +++ b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.h |
| @@ -241,9 +241,10 @@ class PLATFORM_EXPORT BMPImageReader final { |
| : value; |
| } |
| + inline bool IsAlphaSupported() const { return bit_masks_[3]; } |
| + |
| inline unsigned GetAlpha(uint32_t pixel) const { |
| - // For images without alpha, return alpha of 0xff. |
| - return bit_masks_[3] ? GetComponent(pixel, 3) : 0xff; |
| + return GetComponent(pixel, 3); |
|
scroggo_chromium
2017/05/30 19:45:17
Should this
DCHECK(IsAlphaSupported());
?
cblume
2017/05/30 23:45:14
Good idea.
|
| } |
| // Sets the current pixel to the color given by |color_index|. This also |