mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-05 10:49:24 +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) {
|
constructor(canvas: HTMLCanvasElement) {
|
||||||
const gl =
|
const gl =
|
||||||
canvas.getContext("webgl2", { alpha: false }) ||
|
canvas.getContext("webgl2", {
|
||||||
canvas.getContext("webgl", { alpha: false });
|
alpha: false,
|
||||||
|
failIfMajorPerformanceCaveat: true,
|
||||||
|
}) ||
|
||||||
|
canvas.getContext("webgl", {
|
||||||
|
alpha: false,
|
||||||
|
failIfMajorPerformanceCaveat: true,
|
||||||
|
});
|
||||||
if (!gl) {
|
if (!gl) {
|
||||||
throw new Error("WebGL not supported");
|
throw new Error("WebGL not supported");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue