From 26ee2ffbb6ee648493409ccdcfdc48bc3ef24f0f Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 22 Jan 2023 17:45:33 +0100 Subject: [PATCH] ANGLE popup --- .../lib/angle-detect/detect-angle-backend.ts | 5 +++-- src/popup/App.vue | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/ext/lib/angle-detect/detect-angle-backend.ts b/src/ext/lib/angle-detect/detect-angle-backend.ts index 08db21a..fbd0c7b 100644 --- a/src/ext/lib/angle-detect/detect-angle-backend.ts +++ b/src/ext/lib/angle-detect/detect-angle-backend.ts @@ -85,7 +85,7 @@ function detectBackend(str) { * Known limitations: D11on12 cannot be detected. * @returns */ -function detectANGLEBackend(): AngleVersion { +export function detectANGLEBackend(): AngleVersion { const canvas = document.createElement("canvas"); const gl = canvas.getContext("webgl2") || canvas.getContext("webgl") || @@ -112,7 +112,8 @@ function detectANGLEBackend(): AngleVersion { (gl as any).compileShader(shader); if (!(gl as any).getShaderParameter(shader, (gl as any).COMPILE_STATUS)) { - return console.error("invalid shader", (gl as any).getShaderInfoLog(shader)); + console.error("invalid shader", (gl as any).getShaderInfoLog(shader)); + return AngleVersion.NotAvailable; } const source = ext.getTranslatedShaderSource(shader); diff --git a/src/popup/App.vue b/src/popup/App.vue index 305505f..fbafe45 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -20,6 +20,16 @@ Build channel: {{BrowserDetect.processEnvChannel}} + +
+
+ Hardware acceleration in is broken
+ This causes videos to be stretched incorrectly. + This is a bug with , not with this addon.
+ To fix the problem, visit ://flags#use-angle and choose D3D9 or OpenGL from available options. +
+
+