[Webkit-unassigned] [Bug 236173] Big drop in canvas performance above 3840px
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Feb 5 01:03:05 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=236173
--- Comment #1 from webkit_org at zdanowski.pro ---
After digging deeper this behavior seems ... intentional, but imho misguided. The canvas seems to be dropped from being GPU-accelerated based on HTMLCanvasElement::shouldAccelerate (link#1) due to MaximumAccelerated2dCanvasSize being set to 5120*2880 (link#2). Digging deeper this setting was originally introduced in the patch for https://bugs.webkit.org/show_bug.cgi?id=167968 (link#3). Such canvas falling off the acceleration causes a large performance drop, which isn't surprising.
I don't see the rationale behind bug 167968 as it's probably only in Radar. The limit for the accelerated canvas is documented as "5120x2880 which is the 5K resolution for 16:9" in the commit. While this kind of makes sense the resolution is insufficient to render display-scaled full-screen canvas on a 4K display (which will be ~6720x3780).
Can someone shed some light on this?
Is there a way to change the limit on the JS side?
Is there a way to tell if the canvas is accelerated from JS?
Links to code for easy clicks:
1. https://github.com/WebKit/WebKit/blob/31bd02411a15b0c59150a09677d27d721079dcbf/Source/WebCore/html/HTMLCanvasElement.cpp#L841
2. https://github.com/WebKit/WebKit/blob/6bbe48d7161ec52d6b644950cfca5883ab874d2a/Source/WebCore/page/Settings.yaml#L323
3. https://github.com/WebKit/WebKit/commit/ae4a8115b3efde63f0dd0dfa32855d82e87fb6a3
--
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/20220205/5f1e6539/attachment-0001.htm>
More information about the webkit-unassigned
mailing list