Canvas in WebView in UXP sometimes gets erased

, ,

Hi, I am playing with WebViews in Photoshop and canvases.
After some time HTML canvas gets erased. Canvases look empty. Both for 2d and webgl contexts.
getImageData returns non-erased data.
Sometimes it is related to ‘visibilitychange’ events, but sometimes it is triggered on its own.

Solution would get to call getImageData and putImageData, but maybe there is a better way.
get/put are not free to call. And no canvases would confuse the user.

I’m currently using a canvas inside a local webview and it works well in general for me.
Just curious, do you have a similar setup with a canvas inside a local webview?

Similar setup. Also a local webview. Maybe the plugin gets OOM on the GPU side in my case and canvases get erased

ok, webview just uses Safari on Mac.
And this bug is safari’s bug. Nothing UXP team can do.

It should work on windows, because it uses edge there.