From f77b4633399925508c48a225a6fd8c321b523ae2 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 31 Oct 2018 16:22:17 +0100 Subject: [PATCH] Attempt to clean-up/restore pending rendering operations on `RenderTask.cancel` (issue 10200) Please note that, given the lack of a runnable example, I'm not totally sure if this first of all is enough to *completely* address the issue as filed and second of all if we actually want this new behaviour. --- src/display/api.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/display/api.js b/src/display/api.js index ca192afe4..969d6c62a 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -2439,6 +2439,9 @@ var InternalRenderTask = (function InternalRenderTaskClosure() { cancel: function InternalRenderTask_cancel() { this.running = false; this.cancelled = true; + if (this.gfx) { + this.gfx.endDrawing(); + } if (this._canvas) { canvasInRendering.delete(this._canvas); }