[Pkg-javascript-commits] [pdf.js] 14/106: Disables rAF for the printing.
David Prévot
taffit at moszumanska.debian.org
Sat Jun 20 21:33:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit dd07ef9c6a8bc98b7fbe2bd0d7ae9f4bf4fef113
Author: Yury Delendik <ydelendik at mozilla.com>
Date: Tue May 12 08:44:42 2015 -0500
Disables rAF for the printing.
---
src/display/api.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/display/api.js b/src/display/api.js
index 3bb9a0c..7919cb4 100644
--- a/src/display/api.js
+++ b/src/display/api.js
@@ -740,6 +740,7 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
this.commonObjs,
intentState.operatorList,
this.pageNumber);
+ internalRenderTask.useRequestAnimationFrame = renderingIntent !== 'print';
if (!intentState.renderTasks) {
intentState.renderTasks = [];
}
@@ -1555,6 +1556,7 @@ var InternalRenderTask = (function InternalRenderTaskClosure() {
this.running = false;
this.graphicsReadyCallback = null;
this.graphicsReady = false;
+ this.useRequestAnimationFrame = false;
this.cancelled = false;
this.capability = createPromiseCapability();
this.task = new RenderTask(this);
@@ -1628,7 +1630,11 @@ var InternalRenderTask = (function InternalRenderTaskClosure() {
},
_scheduleNext: function InternalRenderTask__scheduleNext() {
- window.requestAnimationFrame(this._nextBound);
+ if (this.useRequestAnimationFrame) {
+ window.requestAnimationFrame(this._nextBound);
+ } else {
+ Promise.resolve(undefined).then(this._nextBound);
+ }
},
_next: function InternalRenderTask__next() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list