Only disable HWA in m-c build and for local dev

This way, we keep pdf.js working as before except for Firefox.
This commit is contained in:
Calixte Denizet 2024-06-16 12:13:15 +02:00
parent 831a526c10
commit 52a06e64f6
2 changed files with 3 additions and 2 deletions

View File

@ -46,9 +46,10 @@
"default": false "default": false
}, },
"enableHWA": { "enableHWA": {
"title": "Enable hardware acceleration",
"description": "Whether to enable hardware acceleration.", "description": "Whether to enable hardware acceleration.",
"type": "boolean", "type": "boolean",
"default": false "default": true
}, },
"enableML": { "enableML": {
"type": "boolean", "type": "boolean",

View File

@ -312,7 +312,7 @@ const defaultOptions = {
}, },
enableHWA: { enableHWA: {
/** @type {boolean} */ /** @type {boolean} */
value: false, value: typeof PDFJSDev !== "undefined" && !PDFJSDev.test("MOZCENTRAL"),
kind: OptionKind.API + OptionKind.VIEWER + OptionKind.PREFERENCE, kind: OptionKind.API + OptionKind.VIEWER + OptionKind.PREFERENCE,
}, },
enableXfa: { enableXfa: {