loleaflet/src/layer/tile/CalcTileLayer.js | 2 +- loleaflet/src/layer/tile/ImpressTileLayer.js | 2 +- loleaflet/src/layer/tile/WriterTileLayer.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit f41c4c6e83764027aae83ceeeef5ab77a722279c Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Mon Jan 9 13:06:13 2017 -0500 loleaflet: on invalidation check the part before intersection Shortcircuiting when the part doesn't match is much faster than intersecting rects first. Change-Id: I9038eb5cafd141e75e8b18a5308b30216e4c9653 Reviewed-on: https://gerrit.libreoffice.org/32918 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 5d6e6e4..cd4ed60 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -50,7 +50,7 @@ L.CalcTileLayer = L.TileLayer.extend({ var tileTopLeft = this._coordsToTwips(coords); var tileBottomRight = new L.Point(this._tileWidthTwips, this._tileHeightTwips); var bounds = new L.Bounds(tileTopLeft, tileTopLeft.add(tileBottomRight)); - if (invalidBounds.intersects(bounds) && coords.part === command.part) { + if (coords.part === command.part && invalidBounds.intersects(bounds)) { if (this._tiles[key]._invalidCount) { this._tiles[key]._invalidCount += 1; } diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js index da0166c..3326fa2 100644 --- a/loleaflet/src/layer/tile/ImpressTileLayer.js +++ b/loleaflet/src/layer/tile/ImpressTileLayer.js @@ -34,7 +34,7 @@ L.ImpressTileLayer = L.TileLayer.extend({ var tileTopLeft = this._coordsToTwips(coords); var tileBottomRight = new L.Point(this._tileWidthTwips, this._tileHeightTwips); var bounds = new L.Bounds(tileTopLeft, tileTopLeft.add(tileBottomRight)); - if (invalidBounds.intersects(bounds) && coords.part === command.part) { + if (coords.part === command.part && invalidBounds.intersects(bounds)) { if (this._tiles[key]._invalidCount) { this._tiles[key]._invalidCount += 1; } diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js index 9402f6c..0e546d0 100644 --- a/loleaflet/src/layer/tile/WriterTileLayer.js +++ b/loleaflet/src/layer/tile/WriterTileLayer.js @@ -33,7 +33,7 @@ L.WriterTileLayer = L.TileLayer.extend({ var tileTopLeft = this._coordsToTwips(coords); var tileBottomRight = new L.Point(this._tileWidthTwips, this._tileHeightTwips); var bounds = new L.Bounds(tileTopLeft, tileTopLeft.add(tileBottomRight)); - if (invalidBounds.intersects(bounds) && coords.part === command.part) { + if (coords.part === command.part && invalidBounds.intersects(bounds)) { if (this._tiles[key]._invalidCount) { this._tiles[key]._invalidCount += 1; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits