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

Fix for #2986 #3084

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix for #2986 #3084

wants to merge 1 commit into from

Conversation

vishwas-r
Copy link

Fix for "Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true" warning in chrome browser

Summary

This PR fixes/implements the following bugs/features

Closing issues
Fixes #2986

…e faster with the willReadFrequently attribute set to true" warning in chrome browser
@Sharcoux
Copy link

Can be tested in @cantoo/html2canvas

@maurice-ellis
Copy link

@vishwas-r , believe this willReadFrequently has to be set on the line above because the context is used below on line 22.

const ctx = canvas.getContext('2d');
const clonedCtx = clonedCanvas.getContext('2d', { willReadFrequently: true });
clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);

@Sharcoux , not sure if you can update yours, I would like to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants