Kaydet (Commit) 91d9276a authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

android: clean MultiTileLayer of unneeded variables/methods

Change-Id: I7750322000230448d6283107daace3d9bb5da61d
üst 3d394257
......@@ -112,7 +112,7 @@ public class GeckoLayerClient implements LayerView.Listener {
mLayerController = layerController;
mRootLayer = new MultiTileLayer(new IntSize(256, 256));
mRootLayer = new MultiTileLayer();
view.setListener(this);
layerController.setRoot(mRootLayer);
......
......@@ -39,7 +39,6 @@
package org.mozilla.gecko.gfx;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;
......@@ -53,30 +52,10 @@ public class MultiTileLayer extends Layer {
private static final String LOGTAG = "GeckoMultiTileLayer";
private final List<SubTile> mTiles;
private IntSize mTileSize;
private IntSize mSize;
public MultiTileLayer(IntSize tileSize) {
public MultiTileLayer() {
super();
mTileSize = tileSize;
mTiles = new CopyOnWriteArrayList<SubTile>();
mSize = new IntSize(0,0);
}
public void invalidate(Rect dirtyRect) {
if (!inTransaction()) {
throw new RuntimeException("invalidate() is only valid inside a transaction");
}
for (SubTile layer : mTiles) {
Rect rect = layer.getPosition();
Rect tileRect = new Rect(layer.x, layer.y, layer.x + rect.width(), layer.y + rect.height());
if (tileRect.intersect(dirtyRect)) {
tileRect.offset(-layer.x, -layer.y);
layer.invalidate();
}
}
}
public void invalidate() {
......@@ -85,14 +64,6 @@ public class MultiTileLayer extends Layer {
}
}
public void setSize(IntSize size) {
mSize = size;
}
public IntSize getSize() {
return mSize;
}
private void validateTiles() {
// Set tile origins and resolution
Point origin = new Point();
......@@ -141,7 +112,6 @@ public class MultiTileLayer extends Layer {
}
private void refreshTileMetrics(Point origin, float resolution, boolean inTransaction) {
IntSize size = getSize();
for (SubTile layer : mTiles) {
if (!inTransaction) {
layer.beginTransaction();
......
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