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

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Tue Jan 13 16:12:44 PST 2015


 android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java |    6 +++++-
 android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java  |    4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 3ac52a60d570fb8afb3d8ad063e35f0667b385cb
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Wed Jan 14 09:09:05 2015 +0900

    android: Inflate viewport even more to render more tiles offscreen
    
    Change-Id: I6a1f8bb8fd04e40ecd60eec87043e507ca6350e7

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 1a67117..31c7a07 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
@@ -165,7 +165,8 @@ public abstract class ComposedTileLayer extends Layer {
                     }
                 }
                 if (!contains) {
-                    LOEvent event = LOEventFactory.tileRequest(this, new TileIdentifier((int) x, (int) y, zoom, tileSize), false);
+                    TileIdentifier tileId = new TileIdentifier((int) x, (int) y, zoom, tileSize);
+                    LOEvent event = LOEventFactory.tileRequest(this, tileId, true);
                     event.mPriority = getTilePriority();
                     LOKitShell.sendEvent(event);
                 }
@@ -212,6 +213,9 @@ public abstract class ComposedTileLayer extends Layer {
         return RectF.intersects(currentViewport, tileId.getRect()) || currentViewport.contains(tileId.getRect());
     }
 
+    /**
+     * Invalidate tiles which intersect the input rect
+     */
     public void invalidateTiles(RectF rect) {
         RectF zoomedRect = RectUtils.inverseScale(rect, currentZoom);
 
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java
index 12ff723..38d6d80 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java
@@ -19,7 +19,7 @@ public class DynamicTileLayer extends ComposedTileLayer {
         return 0;
     }
 
-    protected IntSize getInflateFactor() {
-        return tileSize;
+    private IntSize getInflateFactor() {
+        return new IntSize(tileSize.width*2, tileSize.height*4);
     }
 }


More information about the Libreoffice-commits mailing list