mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-10 07:14:04 +02:00
Remove the enableHWA option from viewer components (PR 20016 follow-up)
In PR 20016 the actual uses of the `enableHWA` option was removed from the viewer, but for some reason it's still being provided when initializing `PDFViewer` and `PDFThumbnailViewer` despite the fact that it's now dead code.
This commit is contained in:
parent
79df166e06
commit
63b4874b39
@ -535,8 +535,7 @@ const PDFViewerApplication = {
|
||||
)
|
||||
: null;
|
||||
|
||||
const enableHWA = AppOptions.get("enableHWA"),
|
||||
maxCanvasPixels = AppOptions.get("maxCanvasPixels"),
|
||||
const maxCanvasPixels = AppOptions.get("maxCanvasPixels"),
|
||||
maxCanvasDim = AppOptions.get("maxCanvasDim"),
|
||||
capCanvasAreaFactor = AppOptions.get("capCanvasAreaFactor");
|
||||
const pdfViewer = (this.pdfViewer = new PDFViewer({
|
||||
@ -580,7 +579,6 @@ const PDFViewerApplication = {
|
||||
pageColors,
|
||||
mlManager,
|
||||
abortSignal,
|
||||
enableHWA,
|
||||
supportsPinchToZoom: this.supportsPinchToZoom,
|
||||
enableAutoLinking: AppOptions.get("enableAutoLinking"),
|
||||
minDurationToUpdateCanvas: AppOptions.get("minDurationToUpdateCanvas"),
|
||||
@ -601,7 +599,6 @@ const PDFViewerApplication = {
|
||||
maxCanvasDim,
|
||||
pageColors,
|
||||
abortSignal,
|
||||
enableHWA,
|
||||
enableSplitMerge,
|
||||
statusBar: viewsManager.viewsManagerStatusBar,
|
||||
undoBar: viewsManager.viewsManagerUndoBar,
|
||||
|
||||
@ -453,7 +453,7 @@ const defaultOptions = {
|
||||
enableHWA: {
|
||||
/** @type {boolean} */
|
||||
value: typeof PDFJSDev !== "undefined" && !PDFJSDev.test("MOZCENTRAL"),
|
||||
kind: OptionKind.API + OptionKind.VIEWER + OptionKind.PREFERENCE,
|
||||
kind: OptionKind.API + OptionKind.PREFERENCE,
|
||||
},
|
||||
enableXfa: {
|
||||
/** @type {boolean} */
|
||||
|
||||
@ -64,8 +64,6 @@ const SPACE_FOR_DRAG_MARKER_WHEN_NO_NEXT_ELEMENT = 15;
|
||||
* mode.
|
||||
* @property {AbortSignal} [abortSignal] - The AbortSignal for the window
|
||||
* events.
|
||||
* @property {boolean} [enableHWA] - Enables hardware acceleration for
|
||||
* rendering. The default value is `false`.
|
||||
* @property {boolean} [enableSplitMerge] - Enables split and merge features.
|
||||
* The default value is `false`.
|
||||
* @property {Object} [statusBar] - The status bar elements to manage the status
|
||||
@ -173,7 +171,6 @@ class PDFThumbnailViewer {
|
||||
maxCanvasDim,
|
||||
pageColors,
|
||||
abortSignal,
|
||||
enableHWA,
|
||||
enableSplitMerge,
|
||||
statusBar,
|
||||
undoBar,
|
||||
@ -188,7 +185,6 @@ class PDFThumbnailViewer {
|
||||
this.maxCanvasPixels = maxCanvasPixels;
|
||||
this.maxCanvasDim = maxCanvasDim;
|
||||
this.pageColors = pageColors || null;
|
||||
this.enableHWA = enableHWA || false;
|
||||
this.#enableSplitMerge = enableSplitMerge || false;
|
||||
this.#statusLabel = statusBar?.viewsManagerStatusActionLabel || null;
|
||||
this.#statusBar = statusBar?.viewsManagerStatusAction || null;
|
||||
@ -415,7 +411,6 @@ class PDFThumbnailViewer {
|
||||
maxCanvasPixels: this.maxCanvasPixels,
|
||||
maxCanvasDim: this.maxCanvasDim,
|
||||
pageColors: this.pageColors,
|
||||
enableHWA: this.enableHWA,
|
||||
enableSplitMerge: this.#enableSplitMerge,
|
||||
});
|
||||
this._thumbnails.push(thumbnail);
|
||||
|
||||
@ -145,8 +145,6 @@ function isValidAnnotationEditorMode(mode) {
|
||||
* @property {Object} [pageColors] - Overwrites background and foreground colors
|
||||
* with user defined ones in order to improve readability in high contrast
|
||||
* mode.
|
||||
* @property {boolean} [enableHWA] - Enables hardware acceleration for
|
||||
* rendering. The default value is `false`.
|
||||
* @property {boolean} [supportsPinchToZoom] - Enable zooming on pinch gesture.
|
||||
* The default value is `true`.
|
||||
* @property {boolean} [enableAutoLinking] - Enable creation of hyperlinks from
|
||||
@ -245,8 +243,6 @@ class PDFViewer {
|
||||
|
||||
#editorUndoBar = null;
|
||||
|
||||
#enableHWA = false;
|
||||
|
||||
#enableHighlightFloatingButton = false;
|
||||
|
||||
#enablePermissions = false;
|
||||
@ -372,7 +368,6 @@ class PDFViewer {
|
||||
this.#enablePermissions = options.enablePermissions || false;
|
||||
this.pageColors = options.pageColors || null;
|
||||
this.#mlManager = options.mlManager || null;
|
||||
this.#enableHWA = options.enableHWA || false;
|
||||
this.#supportsPinchToZoom = options.supportsPinchToZoom !== false;
|
||||
this.#enableAutoLinking = options.enableAutoLinking !== false;
|
||||
this.#minDurationToUpdateCanvas = options.minDurationToUpdateCanvas ?? 500;
|
||||
@ -1070,7 +1065,6 @@ class PDFViewer {
|
||||
pageColors,
|
||||
l10n: this.l10n,
|
||||
layerProperties: this._layerProperties,
|
||||
enableHWA: this.#enableHWA,
|
||||
enableAutoLinking: this.#enableAutoLinking,
|
||||
minDurationToUpdateCanvas: this.#minDurationToUpdateCanvas,
|
||||
commentManager: this.#commentManager,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user