Open tlow92 opened 2 days ago
Could you update the JS code to create a raster surface if webgl is not available?
I'm not sure if I understand you right.
There is no other way than what I described above to detect if webgl is available, is it correct?
Yes, my plan is to use the above workaround to show some text to the user that graphics acceleration is required. I was just hoping that there is a more reliable way. Attaching an empty canvas just for this check is a bit hacky.
you could do it via the OffscreenSurface API
Issue
When using chromium based browsers and hardware acceleration is disabled react-native-skia on web is not initializing properly.
Error:
I think it's coming from here https://github.com/google/skia/blob/ab25edec05410e8ee23c6e4cbe311a70dbf04217/modules/canvaskit/webgl.js#L180
On firefox it works fine even with hardware acceleration disabled.
I know that it comes from canvaskit-wasm but bug reporting for canvaskit seems to not exist anymore and I'm wondering if this is a case that we should handle ourselves? Is there some check that we can do to at least notify users that hardware acceleration is required?
Additional info
Not a solution but to demonstrate, this will return > 0 if context is there and 0 if it is not. So by checking that it can be ensured that skia