1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-28 23:28:16 +02:00

Add an option to enable/disable hardware acceleration (bug 1902012)

This commit is contained in:
Calixte Denizet 2024-06-12 12:51:51 +02:00
parent 341ff40e74
commit ff6180a4c9
13 changed files with 62 additions and 12 deletions

View file

@ -242,7 +242,7 @@ class FakeUnicodeFont {
this.fontFamily = fontFamily;
const canvas = new OffscreenCanvas(1, 1);
this.ctxMeasure = canvas.getContext("2d");
this.ctxMeasure = canvas.getContext("2d", { willReadFrequently: true });
if (!FakeUnicodeFont._fontNameId) {
FakeUnicodeFont._fontNameId = 1;