Title: [121827] trunk/Source/WebCore
Revision
121827
Author
commit-qu...@webkit.org
Date
2012-07-03 22:19:27 -0700 (Tue, 03 Jul 2012)

Log Message

Add a comment in order to clarify why
BitmapImage::frameHasAlphaAtIndex returns true as default.
https://bugs.webkit.org/show_bug.cgi?id=90445

Patch by Huang Dongsung <luxte...@company100.net> on 2012-07-03
Reviewed by Eric Seidel.

No new tests. This patch doesn't change behavior.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameHasAlphaAtIndex):
(WebCore):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121826 => 121827)


--- trunk/Source/WebCore/ChangeLog	2012-07-04 05:00:22 UTC (rev 121826)
+++ trunk/Source/WebCore/ChangeLog	2012-07-04 05:19:27 UTC (rev 121827)
@@ -1,3 +1,17 @@
+2012-07-03  Huang Dongsung  <luxte...@company100.net>
+
+        Add a comment in order to clarify why
+        BitmapImage::frameHasAlphaAtIndex returns true as default.
+        https://bugs.webkit.org/show_bug.cgi?id=90445
+
+        Reviewed by Eric Seidel.
+
+        No new tests. This patch doesn't change behavior.
+
+        * platform/graphics/BitmapImage.cpp:
+        (WebCore::BitmapImage::frameHasAlphaAtIndex):
+        (WebCore):
+
 2012-07-03  Alex Sakhartchouk  <ale...@chromium.org>
 
         [chromium] Avoid calling getUniformLocation??() in the compositor startup

Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (121826 => 121827)


--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2012-07-04 05:00:22 UTC (rev 121826)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2012-07-04 05:19:27 UTC (rev 121827)
@@ -319,8 +319,10 @@
 
 bool BitmapImage::frameHasAlphaAtIndex(size_t index)
 {
+    // When a frame has not finished decoding, always mark it as having alpha.
+    // See ImageSource::framehasAlphaAtIndex for explanation of why incomplete images claim to have alpha.
     if (!ensureFrameIsCached(index))
-        return true; // Why does an invalid index mean alpha?
+        return true;
     return m_frames[index].m_hasAlpha;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to