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

Unified Diff: Source/platform/image-decoders/bmp/BMPImageReader.cpp

Issue 733063005: Don't decode AND mask for an icon that already has alpha information (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Also rebaseline virtual deferred test. Created 6 years, 1 month 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 | « LayoutTests/fast/images/resources/icon-without-and-bitmap.ico ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/image-decoders/bmp/BMPImageReader.cpp
diff --git a/Source/platform/image-decoders/bmp/BMPImageReader.cpp b/Source/platform/image-decoders/bmp/BMPImageReader.cpp
index 55e8190084b1ebdd343c30afae46f2419cfdb18c..d4bc7a6f72d46b04eb26683667e0fa2129de7e19 100644
--- a/Source/platform/image-decoders/bmp/BMPImageReader.cpp
+++ b/Source/platform/image-decoders/bmp/BMPImageReader.cpp
@@ -138,7 +138,7 @@ bool BMPImageReader::decodeBMP(bool onlySize)
// If the image has an AND mask and there was no alpha data, process the
// mask.
- if (m_isInICO && !m_decodingAndMask && !m_buffer->hasAlpha()) {
+ if (m_isInICO && !m_decodingAndMask && (!m_bitMasks[3] || !m_seenNonZeroAlphaPixel)) {
// Reset decoding coordinates to start of image.
m_coord.setX(0);
m_coord.setY(m_isTopDown ? 0 : (m_parent->size().height() - 1));
« no previous file with comments | « LayoutTests/fast/images/resources/icon-without-and-bitmap.ico ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698