[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - android/experimental

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Fri Jan 16 06:22:16 PST 2015


 android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit ce877897fb5fc2f858c302f925d4609c068568da
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Fri Jan 16 23:21:07 2015 +0900

    android: fix invalidation rect calculation in ComposedTileLayer
    
    Change-Id: I5e0a59d6b966daea2a2033b0f52dc6983b837ca1

diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
index d0fe36a..e169056 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
@@ -134,9 +134,6 @@ public abstract class ComposedTileLayer extends Layer implements ComponentCallba
         float newZoom = getZoom(viewportMetrics);
 
         if (!currentViewport.equals(newCurrentViewPort) || currentZoom != newZoom) {
-            if (newZoom == 1.0f) {
-                Log.i(LOGTAG, "Suspisious zoom 1.0");
-            }
             currentViewport = newCurrentViewPort;
             currentZoom = newZoom;
             RectF pageRect = viewportMetrics.getPageRect();
@@ -216,10 +213,9 @@ public abstract class ComposedTileLayer extends Layer implements ComponentCallba
      * Invalidate tiles which intersect the input rect
      */
     public void invalidateTiles(RectF rect) {
-        RectF zoomedRect = RectUtils.inverseScale(rect, currentZoom);
-
+        RectF zoomedRect = RectUtils.scale(rect, currentZoom);
         for (SubTile tile : tiles.values()) {
-            if (RectF.intersects(rect, tile.id.getRect())) {
+            if (RectF.intersects(zoomedRect, tile.id.getRect())) {
                 LOKitShell.sendEvent(LOEventFactory.tileRerender(this, tile));
             }
         }


More information about the Libreoffice-commits mailing list