Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit b2be4893 authored by Simon Chan's avatar Simon Chan
Browse files

feat(webcodecs): don't use software-based WebGL

parent 28d650f6
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -28,8 +28,14 @@ void main(void) {

    constructor(canvas: HTMLCanvasElement) {
        const gl =
            canvas.getContext("webgl2", { alpha: false }) ||
            canvas.getContext("webgl", { alpha: false });
            canvas.getContext("webgl2", {
                alpha: false,
                failIfMajorPerformanceCaveat: true,
            }) ||
            canvas.getContext("webgl", {
                alpha: false,
                failIfMajorPerformanceCaveat: true,
            });
        if (!gl) {
            throw new Error("WebGL not supported");
        }