Debian Codegraph @

android/source/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java

raw
1 package org.mozilla.gecko.gfx;
2
3 import android.content.Context;
4 import android.graphics.RectF;
5
6 public class DynamicTileLayer extends ComposedTileLayer {
7 public DynamicTileLayer(Context context) {
8 super(context);
9 }
10
11 @Override
12 protected RectF getViewPort(ImmutableViewportMetrics viewportMetrics) {
13 RectF rect = viewportMetrics.getViewport();
14 return inflate(roundToTileSize(rect, tileSize), getInflateFactor());
15 }
16
17 @Override
18 protected float getZoom(ImmutableViewportMetrics viewportMetrics) {
19 return viewportMetrics.zoomFactor;
20 }
21
22 @Override
23 protected int getTilePriority() {
24 return 0;
25 }
26
27 private IntSize getInflateFactor() {
28 return new IntSize(tileSize.width*2, tileSize.height*4);
29 }
30 }