Summary: | [GPU Process] REGRESSION: Drawing a large SVG image on a canvas may take too much memory | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | kaput.sts | ||||||
Component: | Canvas | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Major | CC: | dino, ews-watchlist, fmalita, gsnedders, gyuyoung.kim, pdr, roman.n, sabouhallawa, schenney, sergio, simon.fraser, wart.claes, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Other | ||||||||
Hardware: | iPhone / iPad | ||||||||
OS: | Other | ||||||||
URL: | https://codepen.io/Ziriax/full/LYLgYxp | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=227748 | ||||||||
Attachments: |
|
Description
kaput.sts
2021-09-28 02:45:52 PDT
It seems Safari TP on OSX also crashes GPU process, maybe? I cannot reproduce this on macOS 12 beta with Safari 15.1 on Apple Silicon, nor with STP 132, for what it's worth. I can see vastly higher memory usage on macOS 12 beta with Safari 15.1 on Intel and vastly worse performance than Firefox Nightly or Chrome Canary. On the whole my assumption is the crash is "simply" OOM. I'd presume that Firefox and Chrome are cancelling out the factors and therefore they don't actually do anything. GPU Process forced us to draw SVGs into an image buffer and then draw that to the canvas. That's probably the cause of the regression. I see, that was what I expected. So some extra logic should be added to compute the minimal size of such an intermediate texture. If the world canvas transform is known, and the dimensions of the canvas, that is not too difficult IMHO? Created attachment 442208 [details]
Simple test case (Should show a green rectangle)
Created attachment 442212 [details]
Patch
Committed r284740 (243449@main): <https://commits.webkit.org/243449@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442212 [details]. *** Bug 231796 has been marked as a duplicate of this bug. *** Could you tip when it will be in the new safari version? (In reply to Roman Nikitin from comment #12) > Could you tip when it will be in the new safari version? Apple does not comment on future releases. |