diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-01-16 23:21:07 +0900 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-26 10:27:35 +0100 |
commit | d1aad6177cf6917a21b8234461a12f5077353816 (patch) | |
tree | c89e2ff1c24b40ab85a1206d735142421db64159 /android | |
parent | 96fa96b084c1458500f841c6184e18c819fab200 (diff) |
android: fix invalidation rect calculation in ComposedTileLayer
Change-Id: I5e0a59d6b966daea2a2033b0f52dc6983b837ca1
Diffstat (limited to 'android')
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java | 8 |
1 files changed, 2 insertions, 6 deletions
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 d0fe36a5188b..e1690562532c 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)); } } |