CreateScreenshot in worker

Before I was able to use CreateScreenshot in worker via

const canvas = new OffscreenCanvas(size.width, size.height);
Tools._ScreenshotCanvas = canvas as unknown as HTMLCanvasElement;

That ability is removed by this commit: Fix dump tools premul

Hi, how are you doing?

I’m pinging @sebavan for visibilty.

The problem is that the way we did it before was bugged… I don’t know if there’s a way to make it work in a worker, let’s wait for @sebavan answer (but be patient, he is on vacation).

Could that work with an offscreen canvas @Evgeni_Popov ?

This PR should do it:

LOL I was wondering if it could work and @Evgeni_Popov already pushed it LOL