mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-05 02:39:26 +02:00
feat(webcodecs): don't use software-based WebGL
This commit is contained in:
parent
28d650f63a
commit
b2be4893e9
1 changed files with 8 additions and 2 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue