RESOLVED FIXED 99326
In Skia's ImageFrame, only set the isOpaque flag when the frame is complete
https://bugs.webkit.org/show_bug.cgi?id=99326
Summary In Skia's ImageFrame, only set the isOpaque flag when the frame is complete
Mike Reed
Reported 2012-10-15 07:55:48 PDT
In Skia's ImageFrame, only set the isOpaque flag when the frame is complete
Attachments
Patch (3.48 KB, patch)
2012-10-15 08:01 PDT, Mike Reed
no flags
Patch (4.30 KB, patch)
2012-10-15 08:48 PDT, Mike Reed
no flags
Patch (4.44 KB, patch)
2012-10-15 09:50 PDT, Mike Reed
no flags
Patch (4.45 KB, patch)
2012-10-15 14:10 PDT, Mike Reed
no flags
Patch (4.45 KB, patch)
2012-10-15 14:12 PDT, Mike Reed
no flags
Mike Reed
Comment 1 2012-10-15 08:01:14 PDT
Peter Beverloo (cr-android ews)
Comment 2 2012-10-15 08:34:24 PDT
Comment on attachment 168712 [details] Patch Attachment 168712 [details] did not pass cr-android-ews (chromium-android): Output: http://queues.webkit.org/results/14292761
Stephen White
Comment 3 2012-10-15 08:36:37 PDT
Looks like this is missing some .h changes? +abarth for his image decoder expertise.
Mike Reed
Comment 4 2012-10-15 08:48:29 PDT
Mike Reed
Comment 5 2012-10-15 08:49:14 PDT
forgot to upload change to ImageDecoder.h
Stephen White
Comment 6 2012-10-15 09:23:08 PDT
Comment on attachment 168724 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168724&action=review This looks reasonable to me, but I'll leave for Adam in case he has any comments. > Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp:55 > + setHasAlpha(other.hasAlpha()); Is it important that you do the new special logic here? If so, it seems that m_status must be initialized before this is called. Perhaps you should add a comment to that effect.
Adam Barth
Comment 7 2012-10-15 09:25:41 PDT
> This looks reasonable to me, but I'll leave for Adam in case he has any comments. Looks reasonable to me too.
Mike Reed
Comment 8 2012-10-15 09:50:34 PDT
Mike Reed
Comment 9 2012-10-15 09:51:07 PDT
patch #3 adds comment about calling setHasAlpha after calling setStatus.
Stephen White
Comment 10 2012-10-15 10:00:17 PDT
Comment on attachment 168731 [details] Patch OK (bots willing). r=me
WebKit Review Bot
Comment 11 2012-10-15 14:01:59 PDT
Comment on attachment 168731 [details] Patch Rejecting attachment 168731 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://queues.webkit.org/results/14291783
Mike Reed
Comment 12 2012-10-15 14:10:23 PDT
Mike Reed
Comment 13 2012-10-15 14:10:46 PDT
reloaded with OOPS. PTAL
Stephen White
Comment 14 2012-10-15 14:11:57 PDT
Comment on attachment 168776 [details] Patch Once more, with feeling. r=me (Sadly, I think you might need the exclamation mark too).
Mike Reed
Comment 15 2012-10-15 14:12:44 PDT
Mike Reed
Comment 16 2012-10-15 14:13:02 PDT
OOPS!
Stephen White
Comment 17 2012-10-15 14:14:06 PDT
Comment on attachment 168777 [details] Patch <insert Bill Murray here> r=me
WebKit Review Bot
Comment 18 2012-10-15 15:15:49 PDT
Comment on attachment 168777 [details] Patch Clearing flags on attachment: 168777 Committed r131370: <http://trac.webkit.org/changeset/131370>
WebKit Review Bot
Comment 19 2012-10-15 15:15:53 PDT
All reviewed patches have been landed. Closing bug.
noel gordon
Comment 20 2012-10-16 07:34:19 PDT
(In reply to comment #19) > All reviewed patches have been landed. Closing bug. And landed by the time this got to me.
noel gordon
Comment 21 2012-10-16 07:49:35 PDT
Comment on attachment 168777 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168777&action=review > Source/WebCore/ChangeLog:12 > + Really don't understand these comments (lines 8-11); the tests are passing last I looked. > Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp:74 > + m_hasAlpha = true; So if we returned and had to paint the image buffer here, would the opaque setting of m_bitmap be correct given you set m_hasAlpha = true here, viz., would m_bitmap.bitmap().isOpaque() return false at this time. It's not clear to me where the opaque value was initialized for the m_bitmap, but one of this function or the class constructor seems wrong.
Mike Reed
Comment 22 2012-10-16 07:56:29 PDT
Comment on attachment 168777 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168777&action=review >> Source/WebCore/ChangeLog:12 >> + > > Really don't understand these comments (lines 8-11); the tests are passing last I looked. This is a chicken-egg problem. We have a hack in skia that works around this bug. If I remove that hack, DRT has tests that will fail, so I have to first fix the webkit code and then do the 2nd half of the fix in skia. If I did the changes in the other order, the tests would fail.. until I also landed the webkit change. >> Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp:74 >> + m_hasAlpha = true; > > So if we returned and had to paint the image buffer here, would the opaque setting of m_bitmap be correct given you set m_hasAlpha = true here, viz., would m_bitmap.bitmap().isOpaque() return false at this time. It's not clear to me where the opaque value was initialized for the m_bitmap, but one of this function or the class constructor seems wrong. We will *never* set skia's opaque bit until the image-decode statis FrameComplete, so yes, isOpaque will be false if we stopped right after zeroing, but didn't complete the decode. I guess we could call setHasAlpha(true) instead of setting this field directly. Might be clearer. I'm not sure that there is a real bug, but I'd be fine with making that change as a new CL.
Note You need to log in before you can comment on or make changes to this bug.