Stop including isOffscreenCanvasSupported
in the "StartRenderPage" message
With the previous commit this is now completely unused in API, hence it can be removed. This is done in a separate commit to make it easier to re-instate it, would the need ever arise.
This commit is contained in:
parent
fc055dbd80
commit
50c844c5b8
@ -417,8 +417,6 @@ class Page {
|
|||||||
this.resources,
|
this.resources,
|
||||||
this.nonBlendModesSet
|
this.nonBlendModesSet
|
||||||
),
|
),
|
||||||
isOffscreenCanvasSupported:
|
|
||||||
this.evaluatorOptions.isOffscreenCanvasSupported,
|
|
||||||
pageIndex: this.pageIndex,
|
pageIndex: this.pageIndex,
|
||||||
cacheKey,
|
cacheKey,
|
||||||
});
|
});
|
||||||
|
@ -1521,25 +1521,19 @@ class PDFPageProxy {
|
|||||||
intentState.displayReadyCapability.promise,
|
intentState.displayReadyCapability.promise,
|
||||||
optionalContentConfigPromise,
|
optionalContentConfigPromise,
|
||||||
])
|
])
|
||||||
.then(
|
.then(([transparency, optionalContentConfig]) => {
|
||||||
([
|
if (this.#pendingCleanup) {
|
||||||
{ transparency, isOffscreenCanvasSupported },
|
complete();
|
||||||
optionalContentConfig,
|
return;
|
||||||
]) => {
|
|
||||||
if (this.#pendingCleanup) {
|
|
||||||
complete();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this._stats?.time("Rendering");
|
|
||||||
|
|
||||||
internalRenderTask.initializeGraphics({
|
|
||||||
transparency,
|
|
||||||
isOffscreenCanvasSupported,
|
|
||||||
optionalContentConfig,
|
|
||||||
});
|
|
||||||
internalRenderTask.operatorListChanged();
|
|
||||||
}
|
}
|
||||||
)
|
this._stats?.time("Rendering");
|
||||||
|
|
||||||
|
internalRenderTask.initializeGraphics({
|
||||||
|
transparency,
|
||||||
|
optionalContentConfig,
|
||||||
|
});
|
||||||
|
internalRenderTask.operatorListChanged();
|
||||||
|
})
|
||||||
.catch(complete);
|
.catch(complete);
|
||||||
|
|
||||||
return renderTask;
|
return renderTask;
|
||||||
@ -1763,7 +1757,7 @@ class PDFPageProxy {
|
|||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_startRenderPage(transparency, isOffscreenCanvasSupported, cacheKey) {
|
_startRenderPage(transparency, cacheKey) {
|
||||||
const intentState = this._intentStates.get(cacheKey);
|
const intentState = this._intentStates.get(cacheKey);
|
||||||
if (!intentState) {
|
if (!intentState) {
|
||||||
return; // Rendering was cancelled.
|
return; // Rendering was cancelled.
|
||||||
@ -1772,10 +1766,7 @@ class PDFPageProxy {
|
|||||||
|
|
||||||
// TODO Refactor RenderPageRequest to separate rendering
|
// TODO Refactor RenderPageRequest to separate rendering
|
||||||
// and operator list logic
|
// and operator list logic
|
||||||
intentState.displayReadyCapability?.resolve({
|
intentState.displayReadyCapability?.resolve(transparency);
|
||||||
transparency,
|
|
||||||
isOffscreenCanvasSupported,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2737,11 +2728,7 @@ class WorkerTransport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const page = this.#pageCache.get(data.pageIndex);
|
const page = this.#pageCache.get(data.pageIndex);
|
||||||
page._startRenderPage(
|
page._startRenderPage(data.transparency, data.cacheKey);
|
||||||
data.transparency,
|
|
||||||
data.isOffscreenCanvasSupported,
|
|
||||||
data.cacheKey
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
messageHandler.on("commonobj", ([id, type, exportedData]) => {
|
messageHandler.on("commonobj", ([id, type, exportedData]) => {
|
||||||
@ -3303,11 +3290,7 @@ class InternalRenderTask {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initializeGraphics({
|
initializeGraphics({ transparency = false, optionalContentConfig }) {
|
||||||
transparency = false,
|
|
||||||
isOffscreenCanvasSupported = false,
|
|
||||||
optionalContentConfig,
|
|
||||||
}) {
|
|
||||||
if (this.cancelled) {
|
if (this.cancelled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user