Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas2D getImageData warning #154

Open
pecoram opened this issue Feb 5, 2024 · 1 comment
Open

Canvas2D getImageData warning #154

pecoram opened this issue Feb 5, 2024 · 1 comment

Comments

@pecoram
Copy link
Contributor

pecoram commented Feb 5, 2024

Chrome console gives this warning:

Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently

@wouterlucas wouterlucas added this to the Release Candidate 1 milestone Feb 6, 2024
@wouterlucas wouterlucas moved this to Todo in Lightning 3.0 Feb 6, 2024
@wouterlucas
Copy link
Contributor

wouterlucas commented Mar 6, 2024

I think we need to be careful with that, because the way I understand the flag it may flip it to be software instead of hardware accelerated.

As per the note:

CanvasRenderingContext2D objects with will read frequently equal to true tell the user agent that the webpage is likely to perform many readback operations and that it is advantageous to use a software canvas.

Which - dependent on how the engine handles that - might be disadvantageous on lower end devices with very limited CPU power.

I'd not do this until we know, with a high level of confidence, it wont negatively impact performance on SmartTVs / STBs.

@wouterlucas wouterlucas removed this from the Release Candidate 1 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Todo
Development

No branches or pull requests

2 participants