Kaydet (Commit) 36e3a12a authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Miklos Vajna

android: restructure reevaluateTiles

Change-Id: I1c0657e512e6d3bf7a4742a356f201c993aef658
üst 9a51a1f4
...@@ -153,15 +153,18 @@ public abstract class ComposedTileLayer extends Layer implements ComponentCallba ...@@ -153,15 +153,18 @@ public abstract class ComposedTileLayer extends Layer implements ComponentCallba
return; return;
} }
long currentReevaluationNanoTime = System.nanoTime();
if ((currentReevaluationNanoTime - reevaluationNanoTime) < 25 * 1000000) {
return;
}
reevaluationNanoTime = currentReevaluationNanoTime;
currentViewport = newViewPort; currentViewport = newViewPort;
currentZoom = newZoom; currentZoom = newZoom;
currentPageRect = viewportMetrics.getPageRect(); currentPageRect = viewportMetrics.getPageRect();
long currentReevaluationNanoTime = System.nanoTime(); LOKitShell.sendTileReevaluationRequest(this);
if ((currentReevaluationNanoTime - reevaluationNanoTime) > 25 * 1000000) {
reevaluationNanoTime = currentReevaluationNanoTime;
LOKitShell.sendTileReevaluationRequest(this);
}
} }
protected abstract RectF getViewPort(ImmutableViewportMetrics viewportMetrics); protected abstract RectF getViewPort(ImmutableViewportMetrics viewportMetrics);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment