[Webkit-unassigned] [Bug 174451] New: Async image decoding for large images should be disabled after the first time a tile is painted

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 12 18:56:46 PDT 2017


            Bug ID: 174451
           Summary: Async image decoding for large images should be
                    disabled after the first time a tile is painted
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Images
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sabouhallawa at apple.com

Consider the following scenarios:
1) Changing the css background-image of an element from a low resolution image to a higher resolution image when it finishes loading.
2) Slide show where the src of the <img> element is changed when a user click on the next and the previous buttons.
3) A webcam image where the cached image is recreated every time a new frame is pushed from the server to WebKit.

In these cases we should not use async image decoding because it is two steps drawing:
1) the first time, the image frame is requested for decoding.
2) the second time, the image is drawn after its frame is decoded.

Because during the first step no contents will be displayed, a flash will happen. If no content is displayed in the middle of displaying the same cached image twice or displaying two different cached images, this will be considered a flash. 

So we have to ensure nothing was drawn in the renderer rectangle before being in situation we are going to display no contents where there was an image drawn in the same rectangle. In other words we should detect the case of flashing before it happens and don't use the asynchronous image decoding in this case.

A very reliable way to detect this case is to consult the tile repaintCount. If it is zero, then it is safe to use asynchronous image decoded. If the tile repaintCount is greater than zero, we are not sure if the renderer rectangle has an image drawn in it already or not. In this case we have to use the synchronous image decoding to avoid causing a flash.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170713/8359f0c1/attachment.html>

More information about the webkit-unassigned mailing list