RESOLVED FIXED 165039
Enable async image decoding for large images
https://bugs.webkit.org/show_bug.cgi?id=165039
Summary Enable async image decoding for large images
Said Abou-Hallawa
Reported 2016-11-22 23:06:08 PST
The large image will request its first frame to be decoded once it is drawn. This should improve the first time paint scenario. It can also improve the scrolling scenario if the image is drawn on a tile outside the viewport.
Attachments
Patch (30.29 KB, patch)
2016-11-22 23:12 PST, Said Abou-Hallawa
no flags
Patch (46.87 KB, patch)
2016-11-22 23:30 PST, Said Abou-Hallawa
no flags
Patch (46.87 KB, patch)
2016-11-22 23:48 PST, Said Abou-Hallawa
no flags
Patch (46.14 KB, patch)
2016-11-22 23:53 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews103 for mac-yosemite (1.12 MB, application/zip)
2016-11-23 00:42 PST, Build Bot
no flags
Archive of layout-test-results from ews116 for mac-yosemite (1.22 MB, application/zip)
2016-11-23 00:52 PST, Build Bot
no flags
Archive of layout-test-results from ews124 for ios-simulator-wk2 (10.99 MB, application/zip)
2016-11-23 01:15 PST, Build Bot
no flags
Archive of layout-test-results from ews107 for mac-yosemite-wk2 (7.68 MB, application/zip)
2016-11-23 01:47 PST, Build Bot
no flags
Patch (47.09 KB, patch)
2016-11-23 15:10 PST, Said Abou-Hallawa
no flags
Patch (47.09 KB, patch)
2016-11-23 15:35 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews102 for mac-yosemite (1.22 MB, application/zip)
2016-11-23 16:43 PST, Build Bot
no flags
Patch (47.09 KB, patch)
2016-11-23 16:48 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews102 for mac-yosemite (1.38 MB, application/zip)
2016-11-23 17:47 PST, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (927.09 KB, application/zip)
2016-11-23 17:59 PST, Build Bot
no flags
Archive of layout-test-results from ews117 for mac-yosemite (1.83 MB, application/zip)
2016-11-23 18:03 PST, Build Bot
no flags
Archive of layout-test-results from ews121 for ios-simulator-wk2 (9.03 MB, application/zip)
2016-11-23 18:11 PST, Build Bot
no flags
Patch (47.37 KB, patch)
2016-11-24 01:59 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews102 for mac-yosemite (1003.87 KB, application/zip)
2016-11-24 03:06 PST, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-yosemite (1.67 MB, application/zip)
2016-11-24 03:19 PST, Build Bot
no flags
Patch (51.22 KB, patch)
2016-11-27 11:22 PST, Said Abou-Hallawa
no flags
Patch (37.05 KB, patch)
2016-11-27 13:59 PST, Said Abou-Hallawa
no flags
Patch (51.16 KB, patch)
2016-11-27 14:08 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews103 for mac-yosemite (1.21 MB, application/zip)
2016-11-27 14:48 PST, Build Bot
no flags
Archive of layout-test-results from ews114 for mac-yosemite (1.66 MB, application/zip)
2016-11-27 15:06 PST, Build Bot
no flags
Patch (51.16 KB, patch)
2016-11-27 19:59 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews102 for mac-yosemite (1.04 MB, application/zip)
2016-11-27 21:00 PST, Build Bot
no flags
Archive of layout-test-results from ews117 for mac-yosemite (1.71 MB, application/zip)
2016-11-27 21:07 PST, Build Bot
no flags
Patch (52.26 KB, patch)
2016-11-27 21:47 PST, Said Abou-Hallawa
no flags
Patch (54.35 KB, patch)
2016-11-28 01:06 PST, Said Abou-Hallawa
no flags
Patch (55.75 KB, patch)
2016-11-28 10:52 PST, Said Abou-Hallawa
no flags
Patch (67.38 KB, patch)
2017-02-21 18:19 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews124 for ios-simulator-wk2 (947.80 KB, application/zip)
2017-02-21 19:32 PST, Build Bot
no flags
Patch (72.84 KB, patch)
2017-02-22 13:48 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (1.79 MB, application/zip)
2017-02-22 15:18 PST, Build Bot
no flags
Patch (72.87 KB, patch)
2017-02-22 22:27 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (1.67 MB, application/zip)
2017-02-23 01:19 PST, Build Bot
no flags
Patch (83.85 KB, patch)
2017-03-06 14:17 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (1.20 MB, application/zip)
2017-03-06 15:26 PST, Build Bot
no flags
Archive of layout-test-results from ews114 for mac-elcapitan (1.92 MB, application/zip)
2017-03-06 15:33 PST, Build Bot
no flags
Archive of layout-test-results from ews103 for mac-elcapitan (1.04 MB, application/zip)
2017-03-06 15:38 PST, Build Bot
no flags
Archive of layout-test-results from ews122 for ios-simulator-wk2 (895.62 KB, application/zip)
2017-03-06 15:59 PST, Build Bot
no flags
Patch (84.60 KB, patch)
2017-03-06 18:24 PST, Said Abou-Hallawa
no flags
Patch for 165039 separate from 168814 (21.40 KB, patch)
2017-03-06 18:27 PST, Said Abou-Hallawa
no flags
Patch (89.17 KB, patch)
2017-03-07 11:32 PST, Said Abou-Hallawa
no flags
Patch for 165039 separate from 168814 (26.70 KB, patch)
2017-03-07 11:39 PST, Said Abou-Hallawa
no flags
Patch (34.63 KB, patch)
2017-03-07 20:46 PST, Said Abou-Hallawa
no flags
Patch (34.94 KB, patch)
2017-03-08 08:43 PST, Said Abou-Hallawa
no flags
Patch (42.65 KB, patch)
2017-03-08 15:01 PST, Said Abou-Hallawa
no flags
Patch (48.33 KB, patch)
2017-03-08 17:09 PST, Said Abou-Hallawa
no flags
Patch (25.42 KB, patch)
2017-03-10 21:53 PST, Said Abou-Hallawa
no flags
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (1.67 MB, application/zip)
2017-03-10 22:58 PST, Build Bot
no flags
Archive of layout-test-results from ews102 for mac-elcapitan (917.34 KB, application/zip)
2017-03-10 23:01 PST, Build Bot
no flags
Archive of layout-test-results from ews113 for mac-elcapitan (1.72 MB, application/zip)
2017-03-10 23:09 PST, Build Bot
no flags
Patch (28.64 KB, patch)
2017-03-11 00:59 PST, Said Abou-Hallawa
no flags
Patch (28.84 KB, patch)
2017-03-11 09:59 PST, Said Abou-Hallawa
no flags
Patch (32.44 KB, patch)
2017-03-11 14:12 PST, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2016-11-22 23:12:28 PST
Said Abou-Hallawa
Comment 2 2016-11-22 23:30:42 PST
Said Abou-Hallawa
Comment 3 2016-11-22 23:48:24 PST
Said Abou-Hallawa
Comment 4 2016-11-22 23:53:24 PST
Build Bot
Comment 5 2016-11-23 00:42:51 PST
Comment on attachment 295356 [details] Patch Attachment 295356 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2559609 Number of test failures exceeded the failure limit.
Build Bot
Comment 6 2016-11-23 00:42:56 PST
Created attachment 295358 [details] Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 7 2016-11-23 00:52:04 PST
Comment on attachment 295356 [details] Patch Attachment 295356 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2559615 Number of test failures exceeded the failure limit.
Build Bot
Comment 8 2016-11-23 00:52:09 PST
Created attachment 295359 [details] Archive of layout-test-results from ews116 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 9 2016-11-23 01:14:57 PST
Comment on attachment 295356 [details] Patch Attachment 295356 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2559636 New failing tests: fast/images/image-subsampling.html fast/flexbox/image-percent-max-height.html canvas/philip/tests/2d.drawImage.9arg.sourcepos.html platform/ios-simulator/ios/fast/canvas/image_subSampling_scale.html imported/w3c/canvas/2d.drawImage.9arg.sourcesize.html canvas/philip/tests/2d.drawImage.negativedest.html compositing/backgrounds/fixed-background-on-descendant.html fast/multicol/newmulticol/compare-with-old-impl/shrink-to-column-height-for-pagination.html imported/w3c/canvas/2d.drawImage.negativedir.html imported/w3c/canvas/2d.drawImage.negativedest.html fast/canvas/canvas-drawImage-shadow.html imported/w3c/canvas/2d.drawImage.9arg.sourcepos.html canvas/philip/tests/2d.drawImage.negativesource.html fast/css/object-fit/object-fit-canvas.html fast/flexbox/aspect-ratio-intrinsic-adjust.html compositing/backgrounds/fixed-backgrounds.html imported/w3c/canvas/2d.drawImage.negativesource.html fast/canvas/image-potential-subsample.html canvas/philip/tests/2d.drawImage.negativeSourceHeight.html canvas/philip/tests/2d.drawImage.negativedir.html
Build Bot
Comment 10 2016-11-23 01:15:02 PST
Created attachment 295360 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 11 2016-11-23 01:47:37 PST
Comment on attachment 295356 [details] Patch Attachment 295356 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2559792 New failing tests: fast/images/image-subsampling.html canvas/philip/tests/2d.drawImage.9arg.sourcepos.html canvas/philip/tests/2d.drawImage.negativedest.html imported/w3c/canvas/2d.pattern.paint.repeat.coord2.html fast/flexbox/image-percent-max-height.html fast/flexbox/aspect-ratio-intrinsic-adjust.html webgl/1.0.2/conformance/canvas/to-data-url-test.html imported/w3c/canvas/2d.drawImage.negativedest.html imported/w3c/canvas/2d.drawImage.negativedir.html imported/w3c/canvas/2d.drawImage.9arg.sourcepos.html fast/css/object-fit/object-fit-shrink.html canvas/philip/tests/2d.pattern.paint.repeat.coord1.html fast/borders/border-painting-correctness-dashed.html canvas/philip/tests/2d.drawImage.negativesource.html imported/w3c/canvas/2d.drawImage.negativesource.html imported/w3c/canvas/2d.drawImage.9arg.sourcesize.html fast/canvas/canvas-blending-image-over-color.html fast/multicol/newmulticol/compare-with-old-impl/shrink-to-column-height-for-pagination.html imported/w3c/canvas/2d.pattern.paint.repeat.coord1.html fast/canvas/canvas-drawImage-shadow.html fast/borders/border-painting-correctness-dotted.html canvas/philip/tests/2d.pattern.paint.repeat.coord3.html canvas/philip/tests/2d.pattern.paint.repeat.coord2.html imported/w3c/canvas/2d.pattern.paint.repeat.coord3.html canvas/philip/tests/2d.drawImage.9arg.sourcesize.html canvas/philip/tests/2d.drawImage.negativeSourceHeight.html canvas/philip/tests/2d.drawImage.negativedir.html
Build Bot
Comment 12 2016-11-23 01:47:41 PST
Created attachment 295361 [details] Archive of layout-test-results from ews107 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Said Abou-Hallawa
Comment 13 2016-11-23 15:10:14 PST
Said Abou-Hallawa
Comment 14 2016-11-23 15:35:57 PST
Build Bot
Comment 15 2016-11-23 16:43:01 PST
Comment on attachment 295382 [details] Patch Attachment 295382 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2562528 New failing tests: imported/blink/fast/frames/navigation-in-pagehide.html svg/custom/anchor-on-use.svg
Build Bot
Comment 16 2016-11-23 16:43:05 PST
Created attachment 295385 [details] Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Said Abou-Hallawa
Comment 17 2016-11-23 16:48:15 PST
Build Bot
Comment 18 2016-11-23 17:47:07 PST
Comment on attachment 295386 [details] Patch Attachment 295386 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2562748 New failing tests: imported/blink/fast/frames/navigation-in-pagehide.html fast/css/object-fit/object-fit-embed.html svg/custom/anchor-on-use.svg
Build Bot
Comment 19 2016-11-23 17:47:11 PST
Created attachment 295388 [details] Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 20 2016-11-23 17:59:11 PST
Comment on attachment 295386 [details] Patch Attachment 295386 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2562769 New failing tests: imported/blink/fast/frames/navigation-in-pagehide.html
Build Bot
Comment 21 2016-11-23 17:59:15 PST
Created attachment 295389 [details] Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 22 2016-11-23 18:03:30 PST
Comment on attachment 295386 [details] Patch Attachment 295386 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2562768 New failing tests: imported/blink/fast/frames/navigation-in-pagehide.html fast/css/object-fit/object-fit-embed.html svg/custom/anchor-on-use.svg
Build Bot
Comment 23 2016-11-23 18:03:34 PST
Created attachment 295390 [details] Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 24 2016-11-23 18:11:52 PST
Comment on attachment 295386 [details] Patch Attachment 295386 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2562780 New failing tests: imported/blink/fast/frames/navigation-in-pagehide.html
Build Bot
Comment 25 2016-11-23 18:11:57 PST
Created attachment 295391 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Said Abou-Hallawa
Comment 26 2016-11-24 01:59:31 PST
Build Bot
Comment 27 2016-11-24 03:06:49 PST
Comment on attachment 295398 [details] Patch Attachment 295398 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2564490 New failing tests: fast/css/object-fit/object-fit-embed.html
Build Bot
Comment 28 2016-11-24 03:06:55 PST
Created attachment 295401 [details] Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 29 2016-11-24 03:19:37 PST
Comment on attachment 295398 [details] Patch Attachment 295398 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2564506 New failing tests: fast/css/object-fit/object-fit-embed.html
Build Bot
Comment 30 2016-11-24 03:19:43 PST
Created attachment 295403 [details] Archive of layout-test-results from ews115 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-yosemite Platform: Mac OS X 10.10.5
Said Abou-Hallawa
Comment 31 2016-11-27 11:22:06 PST
Said Abou-Hallawa
Comment 32 2016-11-27 13:59:39 PST
Said Abou-Hallawa
Comment 33 2016-11-27 14:08:27 PST
Build Bot
Comment 34 2016-11-27 14:48:41 PST
Comment on attachment 295465 [details] Patch Attachment 295465 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2579935 New failing tests: fast/css/object-fit/object-fit-embed.html
Build Bot
Comment 35 2016-11-27 14:48:45 PST
Created attachment 295468 [details] Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 36 2016-11-27 15:06:21 PST
Comment on attachment 295465 [details] Patch Attachment 295465 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2579961 New failing tests: fast/css/object-fit/object-fit-embed.html
Build Bot
Comment 37 2016-11-27 15:06:26 PST
Created attachment 295470 [details] Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Said Abou-Hallawa
Comment 38 2016-11-27 19:59:25 PST
Build Bot
Comment 39 2016-11-27 20:59:58 PST
Comment on attachment 295478 [details] Patch Attachment 295478 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2581106 New failing tests: fast/css/object-fit/object-fit-embed.html transitions/default-timing-function.html
Build Bot
Comment 40 2016-11-27 21:00:03 PST
Created attachment 295479 [details] Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 41 2016-11-27 21:07:53 PST
Comment on attachment 295478 [details] Patch Attachment 295478 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2581110 New failing tests: fast/css/object-fit/object-fit-embed.html
Build Bot
Comment 42 2016-11-27 21:07:58 PST
Created attachment 295480 [details] Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Said Abou-Hallawa
Comment 43 2016-11-27 21:47:25 PST
Said Abou-Hallawa
Comment 44 2016-11-28 01:06:38 PST
Said Abou-Hallawa
Comment 45 2016-11-28 10:52:41 PST
Said Abou-Hallawa
Comment 46 2017-02-21 18:19:43 PST
Build Bot
Comment 47 2017-02-21 19:32:30 PST
Comment on attachment 302351 [details] Patch Attachment 302351 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3169736 New failing tests: compositing/backgrounds/fixed-background-on-descendant.html
Build Bot
Comment 48 2017-02-21 19:32:36 PST
Created attachment 302355 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Said Abou-Hallawa
Comment 49 2017-02-22 13:48:26 PST
Build Bot
Comment 50 2017-02-22 15:18:21 PST
Comment on attachment 302435 [details] Patch Attachment 302435 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3174868 New failing tests: fast/dom/timer-throttling-hidden-page.html
Build Bot
Comment 51 2017-02-22 15:18:26 PST
Created attachment 302449 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Chris Dumez
Comment 52 2017-02-22 15:19:05 PST
(In reply to comment #50) > Comment on attachment 302435 [details] > Patch > > Attachment 302435 [details] did not pass mac-debug-ews (mac): > Output: http://webkit-queues.webkit.org/results/3174868 > > New failing tests: > fast/dom/timer-throttling-hidden-page.html Likely a flake, this is a test I have landed today.
Said Abou-Hallawa
Comment 53 2017-02-22 22:27:21 PST
Build Bot
Comment 54 2017-02-23 01:19:10 PST
Comment on attachment 302494 [details] Patch Attachment 302494 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3177475 New failing tests: fast/dom/timer-throttling-hidden-page.html
Build Bot
Comment 55 2017-02-23 01:19:15 PST
Created attachment 302501 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Said Abou-Hallawa
Comment 56 2017-02-23 08:32:39 PST
(In reply to comment #52) > (In reply to comment #50) > > Comment on attachment 302435 [details] > > Patch > > > > Attachment 302435 [details] did not pass mac-debug-ews (mac): > > Output: http://webkit-queues.webkit.org/results/3174868 > > > > New failing tests: > > fast/dom/timer-throttling-hidden-page.html > > Likely a flake, this is a test I have landed today. Shouldn't this test be marked as a flaky test? https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fdom%2Ftimer-throttling-hidden-page.html
Simon Fraser (smfr)
Comment 57 2017-02-23 13:19:13 PST
Comment on attachment 302494 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=302494&action=review It's really unfortunate that we pass MaxPixelSize down through all these functions. Can we pass down something like a std::optional<IntSize>sizeForDraw or something instead? > Source/WebCore/ChangeLog:20 > + If image source size is large (e.g. 3000x3000 pixels) and the size of the > + destination rectangle is small, CGImageSourceCreateThumbnailAtIndex() is > + slower than CGImageSourceCreateImageAtIndex() in decoding this image. To > + overcome this problem, the entry (kCGImageSourceThumbnailMaxPixelSize, > + max(destinationRect.width, destinationRect.height)) is added to the options > + dictionary when calling CGImageSourceCreateThumbnailAtIndex(). This will > + avoid copying a large block of memory for the unscaled bitmap image. This seems like a different patch. I think you should split this into 2. > Source/WebCore/loader/cache/CachedImage.h:129 > + URL sourceUrl() const override { return m_cachedImages[0]->url(); } Is m_cachedImages guaranteed to have at least one entry? > Source/WebCore/page/FrameView.h:278 > + void requestAsyncDecodingForImagesInRectIncludingSubframes(const IntRect&); This needs to be more specific about what coordinate system 'rect' is in. Is it document coords, or view coords? Does it change with zooming? > Source/WebCore/page/FrameView.h:653 > + void requestAsyncDecodingForImagesInRect(const IntRect&); Ditto. > Source/WebCore/platform/graphics/BitmapImage.cpp:246 > +bool BitmapImage::isAsyncDecodingRequired() Can this be const? > Source/WebCore/platform/graphics/BitmapImage.h:136 > + String sourceURL() const { return imageObserver() ? imageObserver()->sourceUrl().string() : ""; } More efficient to use emptyString() than "". > Source/WebCore/platform/graphics/BitmapImage.h:210 > + MaxPixelSize m_currentMaxPixelSize { MaxPixelSizeNative }; It's not clear what this means. What is the context of "current"? What does "max pixel size" mean for a BitmapImage? > Source/WebCore/platform/graphics/ImageFrame.h:76 > +typedef int MaxPixelSize; You plumb MaxPixelSize through a lot of functions, and it's hard to know what it means. > Source/WebCore/platform/graphics/ImageFrame.h:79 > + MaxPixelSizeUndefined = -1, We try to avoid magic -1 numbers. Can we use std::optional instead?
Said Abou-Hallawa
Comment 58 2017-02-24 10:44:27 PST
Comment on attachment 302494 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=302494&action=review >> Source/WebCore/ChangeLog:20 >> + avoid copying a large block of memory for the unscaled bitmap image. > > This seems like a different patch. I think you should split this into 2. Filed https://bugs.webkit.org/show_bug.cgi?id=168814.
Jon Lee
Comment 59 2017-02-27 14:41:25 PST
*** Bug 161705 has been marked as a duplicate of this bug. ***
Radar WebKit Bug Importer
Comment 60 2017-02-27 14:47:08 PST
Jon Lee
Comment 61 2017-02-27 14:51:14 PST
Said Abou-Hallawa
Comment 62 2017-03-06 14:17:20 PST
Said Abou-Hallawa
Comment 63 2017-03-06 14:18:52 PST
Comment on attachment 303555 [details] Patch This patch include the patch of https://bugs.webkit.org/show_bug.cgi?id=168814. I just want to make sure the test are passing with the combined patch.
Build Bot
Comment 64 2017-03-06 15:26:28 PST
Comment on attachment 303555 [details] Patch Attachment 303555 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3254591 New failing tests: fast/images/reset-image-animation.html
Build Bot
Comment 65 2017-03-06 15:26:41 PST
Created attachment 303569 [details] Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 66 2017-03-06 15:33:34 PST
Comment on attachment 303555 [details] Patch Attachment 303555 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3254594 New failing tests: tables/mozilla/bugs/bug4527.html fast/images/reset-image-animation.html
Build Bot
Comment 67 2017-03-06 15:33:43 PST
Created attachment 303572 [details] Archive of layout-test-results from ews114 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 68 2017-03-06 15:38:38 PST
Comment on attachment 303555 [details] Patch Attachment 303555 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3254626 New failing tests: fast/images/reset-image-animation.html
Build Bot
Comment 69 2017-03-06 15:38:50 PST
Created attachment 303573 [details] Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 70 2017-03-06 15:59:03 PST
Comment on attachment 303555 [details] Patch Attachment 303555 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3254615 New failing tests: fast/images/reset-image-animation.html
Build Bot
Comment 71 2017-03-06 15:59:09 PST
Created attachment 303576 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Said Abou-Hallawa
Comment 72 2017-03-06 18:24:53 PST
Said Abou-Hallawa
Comment 73 2017-03-06 18:27:08 PST
Created attachment 303597 [details] Patch for 165039 separate from 168814
Said Abou-Hallawa
Comment 74 2017-03-07 11:32:58 PST
Said Abou-Hallawa
Comment 75 2017-03-07 11:39:06 PST
Created attachment 303690 [details] Patch for 165039 separate from 168814 This patch gets rid of using descendantsOfType<RenderImage>() in RenderView::requestAsyncDecodingForImagesInDocumentRect(). Instead it uses a HashSet of RenderElement which is built by the HTMLImageElement.
Said Abou-Hallawa
Comment 76 2017-03-07 12:45:31 PST
I am working on a test. But I have to implement the ondecode event instead of using a timer. If it turns out implementing the ondecode event is very involving, I will fallback to using the timer.
Simon Fraser (smfr)
Comment 77 2017-03-07 17:15:23 PST
Comment on attachment 303690 [details] Patch for 165039 separate from 168814 View in context: https://bugs.webkit.org/attachment.cgi?id=303690&action=review > Source/WebCore/platform/graphics/BitmapImage.cpp:178 > + if (!frameHasDecodedNativeImage(m_currentFrame)) > + return; Don't we want to paint the yellow debug color here too? > Source/WebCore/platform/graphics/BitmapImage.cpp:409 > + imageObserver()->changedInRect(this, nullptr); When is newFrameNativeImageAvailableAtIndex() called? If it's during painting, the repaint triggered by changedInRect() will get dropped on the floor. > Source/WebCore/platform/graphics/BitmapImage.cpp:422 > + if (m_source.requestFrameAsyncDecodingAtIndex(0, m_currentSubsamplingLevel, sizeForDrawing)) > + LOG(Images, "BitmapImage::%s - %p - url: %s", __FUNCTION__, this, sourceURL().characters8()); I would prefer not doing work inside the if (), the LOGging here too. > Source/WebCore/rendering/RenderElement.cpp:1440 > + LayoutRect backgroundPaintingRect = backgroundIsPaintedByRoot ? view().backgroundRect() : absoluteClippedOverflowRect(); absoluteClippedOverflowRect is expensive. We should keep an eye out for this being a perf bottleneck. > Source/WebCore/rendering/RenderElement.cpp:1506 > +void RenderElement::unregisterForAsyncImageDecodingCallback() It makes me nervous that we rely on HTMLImageElement() to call this to get unregistered from the RenderView. If there's any code path where that call doesn't happen, then we have a security bug. I would prefer any RenderElement that was registered is able to unregister itself on teardown. > Source/WebCore/rendering/RenderElement.h:140 > + bool intersects(const IntRect&) const; This should be called intersectsAbsoluteRect or something that clarifies the coordinate system of the rect. > Source/WebCore/rendering/RenderView.cpp:1430 > + if (!m_largeImageRenderers.contains(&renderer)) > + m_largeImageRenderers.add(&renderer); Don't call contains before add. That's two hash lookups instead of one. > Source/WebCore/rendering/RenderView.cpp:1436 > + if (m_largeImageRenderers.contains(&renderer)) > + m_largeImageRenderers.remove(&renderer); Don't call contains just to remove! that's two hash lookups instead of one. > Source/WebCore/rendering/RenderView.h:394 > + HashSet<RenderElement*> m_largeImageRenderers; The same "m_largeImageRenderers" should match the function names "registerForAsyncImageDecodingCallback", so this should be m_asyncDecodingImageRenderers. > Source/WebCore/testing/Internals.cpp:478 > + if (InternalSettings* settings = this->settings()) > + settings->setLargeImageAsyncDecodingEnabled(false); That's not the correct way to disable a setting for testing. You should do it via code in DRT/WTR which changes the WK1 or WK2 pref.
Said Abou-Hallawa
Comment 78 2017-03-07 20:46:42 PST
Said Abou-Hallawa
Comment 79 2017-03-08 08:43:14 PST
Said Abou-Hallawa
Comment 80 2017-03-08 15:01:57 PST
Said Abou-Hallawa
Comment 81 2017-03-08 15:08:53 PST
Comment on attachment 303690 [details] Patch for 165039 separate from 168814 View in context: https://bugs.webkit.org/attachment.cgi?id=303690&action=review >> Source/WebCore/platform/graphics/BitmapImage.cpp:178 >> + return; > > Don't we want to paint the yellow debug color here too? Yes. Fixed. >> Source/WebCore/platform/graphics/BitmapImage.cpp:409 >> + imageObserver()->changedInRect(this, nullptr); > > When is newFrameNativeImageAvailableAtIndex() called? If it's during painting, the repaint triggered by changedInRect() will get dropped on the floor. newFrameNativeImageAvailableAtIndex() is called from the decoding thread via callOnMainThread(). So missing a repaint should not happen. >> Source/WebCore/platform/graphics/BitmapImage.cpp:422 >> + LOG(Images, "BitmapImage::%s - %p - url: %s", __FUNCTION__, this, sourceURL().characters8()); > > I would prefer not doing work inside the if (), the LOGging here too. Done. >> Source/WebCore/rendering/RenderElement.cpp:1506 >> +void RenderElement::unregisterForAsyncImageDecodingCallback() > > It makes me nervous that we rely on HTMLImageElement() to call this to get unregistered from the RenderView. If there's any code path where that call doesn't happen, then we have a security bug. I would prefer any RenderElement that was registered is able to unregister itself on teardown. Done. I added a call to unregisterForAsyncImageDecodingCallback(*this) in the destructor of RenderElement. >> Source/WebCore/rendering/RenderElement.h:140 >> + bool intersects(const IntRect&) const; > > This should be called intersectsAbsoluteRect or something that clarifies the coordinate system of the rect. Done. Function is renamed. >> Source/WebCore/rendering/RenderView.cpp:1430 >> + m_largeImageRenderers.add(&renderer); > > Don't call contains before add. That's two hash lookups instead of one. Done. Instead I added isRegisteredForAsyncImageDecodingCallback() to RenderObject(). >> Source/WebCore/rendering/RenderView.cpp:1436 >> + m_largeImageRenderers.remove(&renderer); > > Don't call contains just to remove! that's two hash lookups instead of one. Done. >> Source/WebCore/rendering/RenderView.h:394 >> + HashSet<RenderElement*> m_largeImageRenderers; > > The same "m_largeImageRenderers" should match the function names "registerForAsyncImageDecodingCallback", so this should be m_asyncDecodingImageRenderers. Done. Member was renamed. >> Source/WebCore/testing/Internals.cpp:478 >> + settings->setLargeImageAsyncDecodingEnabled(false); > > That's not the correct way to disable a setting for testing. You should do it via code in DRT/WTR which changes the WK1 or WK2 pref. Done. DRT and WTR was changed to disable the large image decoding.
Simon Fraser (smfr)
Comment 82 2017-03-08 15:28:59 PST
Comment on attachment 303849 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=303849&action=review > Source/WebCore/page/FrameView.cpp:1063 > + requestAsyncDecodingForImagesInAbsoluteRectIncludingSubframes(tiledBacking->tileCoverageRect()); Please fix the comment in TiledBacking that says: // Exposed for testing virtual IntRect tileCoverageRect() const = 0; > Source/WebCore/platform/graphics/BitmapImage.cpp:420 > + LOG(Images, "BitmapImage::%s - %p - url: %s [earlyFrameCount = %ld nextFrame = %ld]", __FUNCTION__, this, sourceURL().characters8(), ++m_earlyFrameCount, index); Better to use string.utf8().data(). > Source/WebCore/platform/graphics/BitmapImage.cpp:444 > + LOG(Images, "BitmapImage::%s - %p - url: %s", __FUNCTION__, this, sourceURL().characters8()); Better to use string.utf8().data(). > Source/WebCore/rendering/RenderView.cpp:1451 > + float scale = frame().frameScaleFactor() * frame().pageZoomFactor() * document().deviceScaleFactor(); > + if (frame().settings().delegatesPageScaling()) > + scale *= frame().page()->pageScaleFactor(); frameScaleFactor() IS pageScaleFactor() if !delegatesPageScaling, so this is super confusing. I think you just want .page()->pageScaleFactor() * frame().pageZoomFactor() * document().deviceScaleFactor(); > Source/WebCore/rendering/RenderView.cpp:1452 > + image->image()->requestAsyncDecoding(expandedIntSize(renderer->objectBoundingBox().size() * scale)); objectBoundingBox isn't the right box, and may be slightly different from the rendered size, leading to slight resizing artifacts. You need to use the rect that RenderImage::paintReplaced() uses. In addition, you need to file a bug to track taking ancestor transforms into account, including ancestor SVG transforms. I really think we should just delay this request until paint time to avoid having to do all the math again. I don't think we'll get it right doing it here.
Said Abou-Hallawa
Comment 83 2017-03-08 17:09:37 PST
Said Abou-Hallawa
Comment 84 2017-03-08 17:25:41 PST
Comment on attachment 303849 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=303849&action=review >> Source/WebCore/platform/graphics/BitmapImage.cpp:420 >> + LOG(Images, "BitmapImage::%s - %p - url: %s [earlyFrameCount = %ld nextFrame = %ld]", __FUNCTION__, this, sourceURL().characters8(), ++m_earlyFrameCount, index); > > Better to use string.utf8().data(). Done. >> Source/WebCore/platform/graphics/BitmapImage.cpp:444 >> + LOG(Images, "BitmapImage::%s - %p - url: %s", __FUNCTION__, this, sourceURL().characters8()); > > Better to use string.utf8().data(). Done. >> Source/WebCore/rendering/RenderView.cpp:1451 >> + scale *= frame().page()->pageScaleFactor(); > > frameScaleFactor() IS pageScaleFactor() if !delegatesPageScaling, so this is super confusing. I think you just want .page()->pageScaleFactor() * frame().pageZoomFactor() * document().deviceScaleFactor(); Done. >> Source/WebCore/rendering/RenderView.cpp:1452 >> + image->image()->requestAsyncDecoding(expandedIntSize(renderer->objectBoundingBox().size() * scale)); > > objectBoundingBox isn't the right box, and may be slightly different from the rendered size, leading to slight resizing artifacts. You need to use the rect that RenderImage::paintReplaced() uses. > > In addition, you need to file a bug to track taking ancestor transforms into account, including ancestor SVG transforms. > > I really think we should just delay this request until paint time to avoid having to do all the math again. I don't think we'll get it right doing it here. Filed https://bugs.webkit.org/show_bug.cgi?id=169396.
WebKit Commit Bot
Comment 85 2017-03-08 18:16:56 PST
Comment on attachment 303870 [details] Patch Clearing flags on attachment: 303870 Committed r213618: <http://trac.webkit.org/changeset/213618>
WebKit Commit Bot
Comment 86 2017-03-08 18:17:08 PST
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 87 2017-03-10 10:02:57 PST
Re-opened since this is blocked by bug 169475
Said Abou-Hallawa
Comment 88 2017-03-10 10:18:53 PST
*** Bug 169473 has been marked as a duplicate of this bug. ***
Said Abou-Hallawa
Comment 89 2017-03-10 21:53:52 PST
Build Bot
Comment 90 2017-03-10 22:58:41 PST
Comment on attachment 304133 [details] Patch Attachment 304133 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3289079 New failing tests: svg/custom/anchor-on-use.svg
Build Bot
Comment 91 2017-03-10 22:58:47 PST
Created attachment 304139 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 92 2017-03-10 23:01:01 PST
Comment on attachment 304133 [details] Patch Attachment 304133 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3289099 New failing tests: svg/custom/anchor-on-use.svg
Build Bot
Comment 93 2017-03-10 23:01:07 PST
Created attachment 304140 [details] Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 94 2017-03-10 23:09:06 PST
Comment on attachment 304133 [details] Patch Attachment 304133 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3289102 New failing tests: svg/custom/anchor-on-use.svg
Build Bot
Comment 95 2017-03-10 23:09:12 PST
Created attachment 304141 [details] Archive of layout-test-results from ews113 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Said Abou-Hallawa
Comment 96 2017-03-11 00:59:44 PST
Said Abou-Hallawa
Comment 97 2017-03-11 09:59:31 PST
Simon Fraser (smfr)
Comment 98 2017-03-11 11:41:51 PST
Comment on attachment 304164 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304164&action=review We need to test that the right thing happens for a directly composited image, but otherwise this looks OK. > Source/WebCore/platform/graphics/BitmapImage.cpp:166 > + m_sizeForDrawing = enclosingIntRect(context.getCTM().mapRect(destRect)).size(); I trust this works for retina, page zoom etc? > Source/WebCore/platform/graphics/BitmapImage.cpp:179 > + if (isLargeImageAsyncDecodingRequired()) { Not new to this patch, but the "required" sounds too strong here. Would read better as "shouldUseAsyncDecoding" or something. > Source/WebCore/platform/graphics/BitmapImage.cpp:435 > + if (m_needsRepaint) { I'm not convinced of the necessity of having the m_needsRepaint member. When would newFrameNativeImageAvailableAtIndex() get called when you do *not* want to call changedInRect? > Source/WebCore/platform/graphics/BitmapImage.cpp:440 > + // Keep the number of decoding threads under control. This seems a bit vague. Maybe just remove the comment. > Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:384 > + // CGImageSourceCreateThumbnailAtIndex() creates a bitmap context with the image native size > + // regardless of the subsamplingLevel unless kCGImageSourceSubsampleFactor is passed. Getting > + // frameSizeAtIndex(index, subsamplingLevel) will return irrelevant size to the size of image > + // that is going to be created so get frameSizeAtIndex() for SubsamplingLevel::Default and > + // compare it with sizeForDrawing. I'm having a hard time understanding this comment. First, CGImageSourceCreateThumbnailAtIndex() doesn't crate a bitmap context, it creates a CGImageRef, and it sounds like correct behavior for it to use the native image size unless you specify kCGImageSourceSubsampleFactor. Does passing SubsamplingLevel::Default here just ensure that *our* code behaves as we want?
Said Abou-Hallawa
Comment 99 2017-03-11 14:12:56 PST
Said Abou-Hallawa
Comment 100 2017-03-11 14:19:15 PST
Comment on attachment 304164 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304164&action=review >> Source/WebCore/platform/graphics/BitmapImage.cpp:166 >> + m_sizeForDrawing = enclosingIntRect(context.getCTM().mapRect(destRect)).size(); > > I trust this works for retina, page zoom etc? Yes this works with page zoom and view zoom correctly. >> Source/WebCore/platform/graphics/BitmapImage.cpp:179 >> + if (isLargeImageAsyncDecodingRequired()) { > > Not new to this patch, but the "required" sounds too strong here. Would read better as "shouldUseAsyncDecoding" or something. Done. Functions were renamed. >> Source/WebCore/platform/graphics/BitmapImage.cpp:435 >> + if (m_needsRepaint) { > > I'm not convinced of the necessity of having the m_needsRepaint member. When would newFrameNativeImageAvailableAtIndex() get called when you do *not* want to call changedInRect? Done. You are right m_needsRepaint is not needed. >> Source/WebCore/platform/graphics/BitmapImage.cpp:440 >> + // Keep the number of decoding threads under control. > > This seems a bit vague. Maybe just remove the comment. The comment was removed. >> Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:384 >> + // compare it with sizeForDrawing. > > I'm having a hard time understanding this comment. First, CGImageSourceCreateThumbnailAtIndex() doesn't crate a bitmap context, it creates a CGImageRef, and it sounds like correct behavior for it to use the native image size unless you specify kCGImageSourceSubsampleFactor. Does passing SubsamplingLevel::Default here just ensure that *our* code behaves as we want? I changed the comment a little. What I meant here is the following: CGImageSourceCreateThumbnailAtIndex() calls CGBitmapContextCreate() to create a CGContext with the image native size regardless of the subsamplingLevel unless kCGImageSourceSubsampleFactor is passed. It then calls CGBitmapContextCreateImage() to get the frame CGImage. Here we are trying to see which size is smaller: the image native size or the sizeForDrawing(). Assuming that frameSizeAtIndex(index, subsamplingLevel) will return the size which CGBitmapContextCreate() will be called with was wrong. To fix this issue we need to get frameSizeAtIndex() for SubsamplingLevel::Default and compare it the sizeForDrawing.
Said Abou-Hallawa
Comment 101 2017-03-11 14:23:15 PST
(In reply to comment #98) > Comment on attachment 304164 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=304164&action=review > > We need to test that the right thing happens for a directly composited > image, but otherwise this looks OK. > Did you mean something like this? <style> .transformed { transform: scale(2); transform-origin: top left; width: 400px; height: 400px; } </style> <body> <div class="transformed"> <img src="image.jpg"> </div> </body> I tested this case and the quality of the image is correct.
Simon Fraser (smfr)
Comment 102 2017-03-11 17:31:33 PST
(In reply to comment #101) > (In reply to comment #98) > > Comment on attachment 304164 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=304164&action=review > > > > We need to test that the right thing happens for a directly composited > > image, but otherwise this looks OK. > > > > Did you mean something like this? > > <style> > .transformed { > transform: scale(2); > transform-origin: top left; > width: 400px; > height: 400px; > } > </style> > <body> > <div class="transformed"> > <img src="image.jpg"> > </div> > </body> No, more like this: <img src="image.jpg" style="will-change: transform">
Simon Fraser (smfr)
Comment 103 2017-03-11 17:32:29 PST
Comment on attachment 304176 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304176&action=review > Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:385 > + // CGImageSourceCreateThumbnailAtIndex() returns a CGImage with the image native size > + // regardless of the subsamplingLevel unless kCGImageSourceSubsampleFactor is passed. > + // Here we are trying to see which size is smaller: the image native size or the > + // sizeForDrawing. If we want a CGImage with the image native size, sizeForDrawing will > + // not passed. So we need to get the image native size with the default subsampling and > + // then compare it with sizeForDrawing. Much clearer, thanks!
Said Abou-Hallawa
Comment 104 2017-03-11 18:31:29 PST
(In reply to comment #102) > (In reply to comment #101) > > (In reply to comment #98) > > > Comment on attachment 304164 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=304164&action=review > > > > > > We need to test that the right thing happens for a directly composited > > > image, but otherwise this looks OK. > > > > > > > Did you mean something like this? > > > > <style> > > .transformed { > > transform: scale(2); > > transform-origin: top left; > > width: 400px; > > height: 400px; > > } > > </style> > > <body> > > <div class="transformed"> > > <img src="image.jpg"> > > </div> > > </body> > > > No, more like this: > > <img src="image.jpg" style="will-change: transform"> This scenario runs correctly but through the synchronous decoding path. RenderLayerBacking::updateImageContents() calls GraphicsLayerCA::setContentsToImage() which calls BitmapImage::nativeImageForCurrentFrame(). This later function forces synchronous when it calls frameImageAtIndex with a null sizeForDrawing.
WebKit Commit Bot
Comment 105 2017-03-11 19:00:50 PST
Comment on attachment 304176 [details] Patch Clearing flags on attachment: 304176 Committed r213764: <http://trac.webkit.org/changeset/213764>
WebKit Commit Bot
Comment 106 2017-03-11 19:01:02 PST
All reviewed patches have been landed. Closing bug.
mitz
Comment 107 2017-03-26 10:04:17 PDT
(In reply to WebKit Commit Bot from comment #105) > Comment on attachment 304176 [details] > Patch > > Clearing flags on attachment: 304176 > > Committed r213764: <http://trac.webkit.org/changeset/213764> This caused bug 170107.
Note You need to log in before you can comment on or make changes to this bug.