You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Native Skia relies on the [OffscreenCanvas API](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) to support GPU-Accelerated offscreen surfacs.
43
43
This means, that to benefit from the GPU acceleration, you will need to provide a polyfill of the [OffscreenCanvas API](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) on Node.
44
-
Below is our own OffScreenCanvas polyfill implementation that relies on WebGL using [headless-gl](https://github.com/stackgl/headless-gl).
45
-
46
-
```tsx
47
-
// Here we use gl for headless webgl support.
48
-
importGLfrom"gl";
49
-
50
-
// Now we need to provide polyfill for WebGLRenderingContext and OffscreenCanvas
For example, [here](https://gist.github.com/wcandillon/a46e922910a814139758d6eda9d99ff8) is an OffScreenCanvas polyfill implementation that relies on WebGL using [headless-gl](https://github.com/stackgl/headless-gl).
0 commit comments