mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Replace the PDFJS.disableWebGL
option with a enableWebGL
option passed, via BaseViewer
/PDFPageView
, to PDFPageProxy.render
Please note that the, pre-existing, viewer preference is already named `enableWebGL`; fixes 4919.
This commit is contained in:
parent
a1cfa5f4d7
commit
77efed6626
6 changed files with 16 additions and 15 deletions
|
@ -707,6 +707,8 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
|
|||
* calling of PDFPage.getViewport method.
|
||||
* @property {string} intent - Rendering intent, can be 'display' or 'print'
|
||||
* (default value is 'display').
|
||||
* @property {boolean} enableWebGL - (optional) Enables WebGL accelerated
|
||||
* rendering for some operations. The default value is `false`.
|
||||
* @property {boolean} renderInteractiveForms - (optional) Whether or not
|
||||
* interactive form elements are rendered in the display
|
||||
* layer. If so, we do not render them on canvas as well.
|
||||
|
@ -828,9 +830,7 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
|
|||
var renderingIntent = (params.intent === 'print' ? 'print' : 'display');
|
||||
var canvasFactory = params.canvasFactory || new DOMCanvasFactory();
|
||||
let webGLContext = new WebGLContext({
|
||||
// TODO: When moving this parameter from `PDFJS` to {RenderParameters},
|
||||
// change its name to `enableWebGL` instead.
|
||||
enable: !getDefaultSetting('disableWebGL'),
|
||||
enable: params.enableWebGL,
|
||||
});
|
||||
|
||||
if (!this.intentStates[renderingIntent]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue