diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-02-17 12:15:27 +0900 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-23 10:10:22 +0100 |
commit | bdf8d4ceb21d2d4aafce30411caa998e17088c84 (patch) | |
tree | 2649fc96ddc8267ecc2c0adb91a6e8e5831fba7e /android | |
parent | 9236370bed2e4959cfd584def062a712ec0d7b56 (diff) |
android: restructure reevaluateTiles
Change-Id: I97bcc19571858fd3a43f7d5a9290a5dace7d97dc
Diffstat (limited to 'android')
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java | 16 |
1 files changed, 8 insertions, 8 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 ac1ffadd178a..1dee5de1cd34 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 @@ -145,15 +145,15 @@ public abstract class ComposedTileLayer extends Layer implements ComponentCallba RectF newViewPort = getViewPort(viewportMetrics); float newZoom = getZoom(viewportMetrics); - if (!currentViewport.equals(newViewPort) || currentZoom != newZoom) { - currentViewport = newViewPort; - currentZoom = newZoom; - RectF pageRect = viewportMetrics.getPageRect(); - - clearMarkedTiles(); - addNewTiles(pageRect); - markTiles(); + if (currentViewport.equals(newViewPort) && FloatUtils.fuzzyEquals(currentZoom, newZoom)) { + return; } + currentViewport = newViewPort; + currentZoom = newZoom; + + clearMarkedTiles(); + addNewTiles(viewportMetrics.getPageRect()); + markTiles(); } protected abstract RectF getViewPort(ImmutableViewportMetrics viewportMetrics); |