Summary: | Tiling CSS gradients is slow | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||||||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, ews-watchlist, sabouhallawa, simon.fraser, thorton, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Antti Koivisto
2018-10-16 06:46:12 PDT
Created attachment 352448 [details]
patch
Comment on attachment 352448 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=352448&action=review > Source/WebCore/platform/graphics/cocoa/IOSurface.h:111 > + WEBCORE_EXPORT RetainPtr<CGImageRef> imageReference(); I don't love it, the sinkIntoImage approach made it much harder to do The Wrong Thing. But I guess you need to keep the surface around? > I don't love it, the sinkIntoImage approach made it much harder to do The
> Wrong Thing. But I guess you need to keep the surface around?
I could throw away the IOSurface but presumably drawing IOSurface backed CGImage to an accelerated context is faster?
Hmm, maybe we can just sink it. Comment on attachment 352448 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=352448&action=review > Source/WebCore/platform/graphics/ImageBuffer.h:84 > + void makeImmutable() { m_isImmutable = true; } Would be nice to have the corresponding const getter. Created attachment 352561 [details]
simpler patch
This ditches the "immutable ImageBuffer" concept and simply sinks the gradient ImageBuffer into an Image and uses that for caching instead.
Created attachment 352563 [details]
simpler patch
Attachment 352563 [details] did not pass style-queue:
ERROR: Source/WebCore/ChangeLog:10: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 1 in 4 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 352564 [details]
simpler patch
Comment on attachment 352564 [details]
simpler patch
Nice! Thank you, that makes me much happier. Is it still a PLT win (I assume?)?
> Nice! Thank you, that makes me much happier. Is it still a PLT win (I
> assume?)?
Hope so. Bots will tell.
Comment on attachment 352564 [details] simpler patch Clearing flags on attachment: 352564 Committed r237230: <https://trac.webkit.org/changeset/237230> All reviewed patches have been landed. Closing bug. Bots indicate that this was >1% progression https://perf-safari.apple.com/v3/#/charts?paneList=((886-1158))&since=1539416881058 Most PLT pages don't have gradients, the ones that were affected got 5-6% faster. |