Bug 170577

Summary: A synchronous DecodingOptions should be compatible with any asynchronous sizeForDrawing DecodingOptions
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: ImagesAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
To be referenced by the test case
none
test case
none
Patch none

Said Abou-Hallawa
Reported 2017-04-06 17:15:23 PDT
This prevents the following repaint infinite loop: Suppose I have two elements 'x' and 'y' and 'y' is the parent of 'x'. Both 'x' and 'y' are using the image 'm' to draw their background. 'x' does not repeat the background while 'y' does. 1. 'x' draws its background. 2. 'm' is not decoded, so request async image decoding for 'm' since it is a large image. 3. 'm' finishes decoding, it repaints the rectangle of 'x'. 4. Repainting the rectangle of 'x' causes a repaint for 'y' as well. 5. To paint 'y', 'm' will be used to draw a pattern. 6. To draw a pattern of 'm', a synchronous decoded frame has to be obtained so the one that finished decoding is now deleted. 7. Now goto step 1 This loops will runs forever. To prevent this loop from happening, once a synchronous decoded frame is found, there is no need to decode it again. This decoded frame is suitable for any sizeForDrawing.
Attachments
Patch (8.43 KB, patch)
2017-04-06 17:19 PDT, Said Abou-Hallawa
no flags
To be referenced by the test case (11.61 KB, image/png)
2017-04-06 18:07 PDT, Said Abou-Hallawa
no flags
test case (991 bytes, text/html)
2017-04-06 18:07 PDT, Said Abou-Hallawa
no flags
Patch (8.43 KB, patch)
2017-04-08 15:22 PDT, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2017-04-06 17:19:41 PDT
Said Abou-Hallawa
Comment 2 2017-04-06 17:20:37 PDT
Said Abou-Hallawa
Comment 3 2017-04-06 18:07:14 PDT
Created attachment 306451 [details] To be referenced by the test case
Said Abou-Hallawa
Comment 4 2017-04-06 18:07:57 PDT
Created attachment 306452 [details] test case
Simon Fraser (smfr)
Comment 5 2017-04-07 17:32:53 PDT
Comment on attachment 306442 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306442&action=review > Source/WebCore/ChangeLog:8 > + Test: fast/images/async-image-background-image-repeated.html This should go below the paragraph below. > Source/WebCore/platform/graphics/DecodingOptions.h:76 > + // Comparing DedocingOptions with isAsynchronous() should not happen. "DedocingOptions"
Said Abou-Hallawa
Comment 6 2017-04-08 15:22:39 PDT
WebKit Commit Bot
Comment 7 2017-04-08 19:39:31 PDT
Comment on attachment 306584 [details] Patch Clearing flags on attachment: 306584 Committed r215157: <http://trac.webkit.org/changeset/215157>
WebKit Commit Bot
Comment 8 2017-04-08 19:39:32 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.