BitmapImage::frameHasAlphaAtIndex returns true as default.
https://bugs.webkit.org/show_bug.cgi?id=90445
Patch by Huang Dongsung <luxtella@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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121827
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-07-03 Huang Dongsung <luxtella@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 <alexst@chromium.org>
[chromium] Avoid calling getUniformLocation??() in the compositor startup
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;
}