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

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: Check presence of alpha data instead. 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..5f4d7cfad0798682d50819f9eaa67b8ff1b3625e 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_buffer->hasAlpha() && !m_seenNonZeroAlphaPixel) {
Peter Kasting 2014/11/21 20:05:54 You shouldn't need to check m_buffer->hasAlpha() a
// 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