[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - loleaflet/src

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 1 20:44:00 UTC 2020


 loleaflet/src/layer/tile/CanvasTileLayer.js |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 071824e9a8c50c4159abbdc865bae19f41741930
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Tue Sep 1 21:35:35 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Tue Sep 1 21:35:35 2020 +0100

    calc canvas: paint invalid tiles until their replacement arrives.
    
    This avoids display corruption when panning, whereby stale/old
    canvas content would continue to be rendered in the 'holes'
    where invalid tiles were not rendered.
    
    Change-Id: Ic886c0924c5a930116b1437c8e0cf35726ab76a5

diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js
index 8643f8bf7..6d6aacecd 100644
--- a/loleaflet/src/layer/tile/CanvasTileLayer.js
+++ b/loleaflet/src/layer/tile/CanvasTileLayer.js
@@ -253,7 +253,7 @@ L.CanvasTilePainter = L.Class.extend({
 			!splitPosChanged &&
 			!scaleChanged);
 
-		console.debug('Tile size: ' + this._layer._getTileSize());
+//		console.debug('Tile size: ' + this._layer._getTileSize());
 
 		if (skipUpdate)
 			return;
@@ -306,10 +306,14 @@ L.CanvasTilePainter = L.Class.extend({
 
 					var key = coords.key();
 					var tile = this._layer._tiles[key];
-					var invalid = tile && tile._invalidCount && tile._invalidCount > 0;
-					if (tile && tile.loaded && !invalid) {
+//					var invalid = tile && tile._invalidCount && tile._invalidCount > 0;
+					if (tile && tile.loaded) {
 						this.paint(tile, ctx);
 					}
+/*					else
+						console.log('missing tile at ' + i + ', ' + j + ' ' +
+							    tile + ' ' + (tile && tile.loaded) + ' ' +
+							    (tile ? tile._invalidCount : -42) + ' ' + invalid); */
 				}
 			}
 		}


More information about the Libreoffice-commits mailing list