Avoid potential negative array index access to cached text.
[LibreOffice.git] / android / source / src / java / org / mozilla / gecko / gfx / DynamicTileLayer.java
blobea95c032e8f385d51417d3a90b4482786b759f54
1 package org.mozilla.gecko.gfx;
3 import android.content.Context;
4 import android.graphics.RectF;
6 public class DynamicTileLayer extends ComposedTileLayer {
7 public DynamicTileLayer(Context context) {
8 super(context);
11 @Override
12 protected RectF getViewPort(ImmutableViewportMetrics viewportMetrics) {
13 RectF rect = viewportMetrics.getViewport();
14 return inflate(roundToTileSize(rect, tileSize), getInflateFactor());
17 @Override
18 protected float getZoom(ImmutableViewportMetrics viewportMetrics) {
19 return viewportMetrics.zoomFactor;
22 @Override
23 protected int getTilePriority() {
24 return 0;
27 private IntSize getInflateFactor() {
28 return new IntSize(tileSize.width*2, tileSize.height*4);