[Webkit-unassigned] [Bug 228208] WebGL 2 performance differs in landscape and portrait mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 23 16:27:14 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=228208

--- Comment #14 from Jasper St. Pierre <jstpierre at mecheye.net> ---
Correct. I create a canvas dynamically, and effectively resize it with:

    canvas.width = window.innerWidth * window.devicePixelRatio;
    canvas.height = window.innerHeight * window.devicePixelRatio;
    canvas.style.width = `${window.innerWidth}px`;
    canvas.style.height = `${window.innerHeight}px`;

So I think the question is how the window's inner width and height change for portrait vs. landscape. I just inserted a <meta viewport> tag which might improve the sizes of things, at the expense of probably making the UI unusable.

The core of the issue is probably that without a viewport specification, portrait was rendering a "zoomed-out" view of the page, which has a large canvas. Curious that the old WebGL implementation didn't seem to have this issue though.

-- 
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/20210723/b15385b0/attachment.htm>


More information about the webkit-unassigned mailing list