From 3ac89aacd2ad1d5265d9ba82f95fafc6daaac77d Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Wed, 13 Nov 2013 13:41:25 -0800 Subject: [PATCH] Remove slow commands check. --- src/display/canvas.js | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/src/display/canvas.js b/src/display/canvas.js index d8884955b..3dc931418 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -456,37 +456,6 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { var EO_CLIP = {}; CanvasGraphics.prototype = { - slowCommands: { - 'stroke': true, - 'closeStroke': true, - 'fill': true, - 'eoFill': true, - 'fillStroke': true, - 'eoFillStroke': true, - 'closeFillStroke': true, - 'closeEOFillStroke': true, - 'showText': true, - 'showSpacedText': true, - 'setStrokeColorSpace': true, - 'setFillColorSpace': true, - 'setStrokeColor': true, - 'setStrokeColorN': true, - 'setFillColor': true, - 'setFillColorN': true, - 'setStrokeGray': true, - 'setFillGray': true, - 'setStrokeRGBColor': true, - 'setFillRGBColor': true, - 'setStrokeCMYKColor': true, - 'setFillCMYKColor': true, - 'paintJpegXObject': true, - 'paintImageXObject': true, - 'paintInlineImageXObject': true, - 'paintInlineImageXObjectGroup': true, - 'paintImageMaskXObject': true, - 'paintImageMaskXObjectGroup': true, - 'shadingFill': true - }, beginDrawing: function CanvasGraphics_beginDrawing(viewport, transparency) { // For pdfs that use blend modes we have to clear the canvas else certain @@ -539,7 +508,6 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { var commonObjs = this.commonObjs; var objs = this.objs; var fnId; - var slowCommands = this.slowCommands; while (true) { if (stepper && i === stepper.nextBreakPoint) { @@ -580,7 +548,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { // If the execution took longer then a certain amount of time, shedule // to continue exeution after a short delay. // However, this is only possible if a 'continueCallback' is passed in. - if (continueCallback && slowCommands[fnId] && Date.now() > endTime) { + if (continueCallback && Date.now() > endTime) { setTimeout(continueCallback, 0); return i; }