Kaydet (Commit) 40e919d2 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

android: remove notifyLayerClientOfGeometryChange (Fennec import)

Change-Id: Ibc1f4d11dcfdf177cd45fcf689b518d975b13709
üst 0151bf3f
......@@ -87,6 +87,7 @@ public class LayerController implements PanZoomTarget {
public void setForceRedraw() {
mForceRedraw = true;
notifyLayerClientOfGeometryChange();
}
public Layer getRoot() { return mRootLayer; }
......@@ -159,14 +160,13 @@ public class LayerController implements PanZoomTarget {
}
/**
* Sets the entire viewport metrics at once. This function does not notify the layer client or
* the pan/zoom controller, so you will need to call notifyLayerClientOfGeometryChange() or
* notifyPanZoomControllerOfGeometryChange() after calling this. You must hold the monitor
* while calling this.
* Sets the entire viewport metrics at once.
* You must hold the monitor while calling this.
*/
public void setViewportMetrics(ViewportMetrics viewport) {
mViewportMetrics = new ImmutableViewportMetrics(viewport);
mView.requestRender();
notifyLayerClientOfGeometryChange();
}
public void setAnimationTarget(ViewportMetrics viewport) {
......@@ -183,11 +183,7 @@ public class LayerController implements PanZoomTarget {
public boolean post(Runnable action) { return mView.post(action); }
/**
* The view as well as the controller itself use this method to notify the layer client that
* the geometry changed.
*/
public void notifyLayerClientOfGeometryChange() {
private void notifyLayerClientOfGeometryChange() {
if (mLayerClient != null)
mLayerClient.geometryChanged();
}
......
......@@ -195,7 +195,6 @@ public class PanZoomController
// transitions.
synchronized (mTarget.getLock()) {
mTarget.setViewportMetrics(getValidViewportMetrics());
mTarget.notifyLayerClientOfGeometryChange();
}
break;
}
......@@ -233,7 +232,6 @@ public class PanZoomController
// page size changed such that we are now in overscroll. snap to the
// the nearest valid viewport
mTarget.setViewportMetrics(validated);
mTarget.notifyLayerClientOfGeometryChange();
}
}
}
......@@ -254,7 +252,6 @@ public class PanZoomController
// case this touchstart is just a tap that doesn't end up triggering
// a redraw
mTarget.setForceRedraw();
mTarget.notifyLayerClientOfGeometryChange();
// fall through
case FLING:
case BOUNCE:
......@@ -460,7 +457,6 @@ public class PanZoomController
viewportMetrics.setOrigin(origin);
mTarget.setViewportMetrics(viewportMetrics);
mTarget.notifyLayerClientOfGeometryChange();
}
private void fling() {
......@@ -628,7 +624,6 @@ public class PanZoomController
float t = ZOOM_ANIMATION_FRAMES[mBounceFrame];
ViewportMetrics newMetrics = mBounceStartMetrics.interpolate(mBounceEndMetrics, t);
mTarget.setViewportMetrics(newMetrics);
mTarget.notifyLayerClientOfGeometryChange();
mBounceFrame++;
}
}
......@@ -637,7 +632,6 @@ public class PanZoomController
private void finishBounce() {
synchronized (mTarget.getLock()) {
mTarget.setViewportMetrics(mBounceEndMetrics);
mTarget.notifyLayerClientOfGeometryChange();
mBounceFrame = -1;
}
}
......@@ -699,7 +693,6 @@ public class PanZoomController
// Force a viewport synchronisation
mTarget.setForceRedraw();
mTarget.notifyLayerClientOfGeometryChange();
}
/* Returns the nearest viewport metrics with no overscroll visible. */
......@@ -883,7 +876,6 @@ public class PanZoomController
// Force a viewport synchronisation
mTarget.setForceRedraw();
mTarget.notifyLayerClientOfGeometryChange();
}
/**
......@@ -894,7 +886,6 @@ public class PanZoomController
ViewportMetrics viewportMetrics = getMutableMetrics();
viewportMetrics.scaleTo(zoomFactor, focus);
mTarget.setViewportMetrics(viewportMetrics);
mTarget.notifyLayerClientOfGeometryChange();
}
public boolean getRedrawHint() {
......
......@@ -17,8 +17,6 @@ public interface PanZoomTarget {
public void setAnimationTarget(ViewportMetrics viewport);
public void setViewportMetrics(ViewportMetrics viewport);
public void notifyLayerClientOfGeometryChange();
public void setForceRedraw();
public boolean post(Runnable action);
......
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