From 9d80116bf085859c17d0626e7a7fb3a5b2c973b1 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 11 Aug 2016 13:27:28 +0200 Subject: [PATCH] Remove closePath() where clip() is used clip() does an implicit closePath(), see https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Compositing#Clipping_paths --- src/ol/render/canvas/replay.js | 1 - src/ol/reproj/index.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/ol/render/canvas/replay.js b/src/ol/render/canvas/replay.js index 549d00d3fa..cc28703652 100644 --- a/src/ol/render/canvas/replay.js +++ b/src/ol/render/canvas/replay.js @@ -2004,7 +2004,6 @@ ol.render.canvas.ReplayGroup.prototype.replay = function(context, pixelRatio, context.lineTo(flatClipCoords[2], flatClipCoords[3]); context.lineTo(flatClipCoords[4], flatClipCoords[5]); context.lineTo(flatClipCoords[6], flatClipCoords[7]); - context.closePath(); context.clip(); var replayTypes = opt_replayTypes ? opt_replayTypes : ol.render.replay.ORDER; diff --git a/src/ol/reproj/index.js b/src/ol/reproj/index.js index b033ed3ce0..21fc1afec4 100644 --- a/src/ol/reproj/index.js +++ b/src/ol/reproj/index.js @@ -224,7 +224,6 @@ ol.reproj.render = function(width, height, pixelRatio, context.lineTo(u1, v1); context.lineTo(u2, v2); } - context.closePath(); context.clip(); context.transform(