Too many active WebGL contexts #951
Replies: 3 comments 4 replies
-
created an issue for it at #956 |
Beta Was this translation helpful? Give feedback.
-
I faced the similar issue, const {CanvasKit} = global;
CanvasKit.MakeWebGLCanvasSurface = CanvasKit.MakeSWCanvasSurface; this will create SWSurface instead of WebGL Surface. |
Beta Was this translation helpful? Give feedback.
-
you can check out this diff: https://github.com/Shopify/react-native-skia/compare/test-surface-cleanup?expand=1 I tried to copy one to one the code from flutter to try to have a proper cleanup but couldn't manage to get it to work. I am still missing something here 🤔 |
Beta Was this translation helpful? Give feedback.
-
I'm trying to render our entire client app on the web.
Suprisingly (for me at least), this works really well out of the box!
Pretty much our entire mobile app displays as intended, and react-native-skia is able to do all its drawing on web just fine!
In our app we use lists with Skia images rendered in each list item. Each of those images are drawn on their own Canvas.
Running on iOS or Android, this works fine. All canvasses are drawn as intended.
But when I tried to run on the web, I stumbled upon a limit of WebGL contexts that are allowed to be active simultaneously.
Many Skia canvas drawings didn't show up.
Does anyone have any idea how to face this issue?
Would I need to rasterize canvasses in some way, reduce the amount of canvasses, or is there a way to allow more WebGL contexts?
Beta Was this translation helpful? Give feedback.
All reactions