mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 699937 - (Cleanup) Remove unused timestamp values [r=Cwiiis]
This commit is contained in:
parent
32ccccc40a
commit
eeac10b3c5
@ -84,7 +84,6 @@ public class PanZoomController
|
||||
// Angle from axis within which we stay axis-locked
|
||||
private static final double AXIS_LOCK_ANGLE = Math.PI / 15.0; // 12 degrees
|
||||
|
||||
private long mLastTimestamp;
|
||||
private Timer mFlingTimer;
|
||||
private Axis mX, mY;
|
||||
/* The span at the first zoom event (in unzoomed page coordinates). */
|
||||
@ -166,7 +165,6 @@ public class PanZoomController
|
||||
Log.e(LOGTAG, "Received impossible touch move while in " + mState);
|
||||
return false;
|
||||
case TOUCHING:
|
||||
mLastTimestamp = System.currentTimeMillis();
|
||||
if (panDistance(event) < PAN_THRESHOLD)
|
||||
return false;
|
||||
// fall through
|
||||
@ -174,13 +172,13 @@ public class PanZoomController
|
||||
mState = PanZoomState.PANNING_LOCKED;
|
||||
// fall through
|
||||
case PANNING_LOCKED:
|
||||
track(event, System.currentTimeMillis());
|
||||
track(event);
|
||||
return true;
|
||||
case PANNING_HOLD:
|
||||
mState = PanZoomState.PANNING;
|
||||
// fall through
|
||||
case PANNING:
|
||||
track(event, System.currentTimeMillis());
|
||||
track(event);
|
||||
return true;
|
||||
case PINCHING:
|
||||
// scale gesture listener will handle this
|
||||
@ -206,7 +204,7 @@ public class PanZoomController
|
||||
case PANNING_HOLD:
|
||||
case PANNING_HOLD_LOCKED:
|
||||
mState = PanZoomState.FLING;
|
||||
fling(System.currentTimeMillis());
|
||||
fling();
|
||||
return true;
|
||||
case PINCHING:
|
||||
int points = event.getPointerCount();
|
||||
@ -239,10 +237,7 @@ public class PanZoomController
|
||||
return (float)Math.sqrt(dx * dx + dy * dy);
|
||||
}
|
||||
|
||||
private void track(MotionEvent event, long timestamp) {
|
||||
long timeStep = timestamp - mLastTimestamp;
|
||||
mLastTimestamp = timestamp;
|
||||
|
||||
private void track(MotionEvent event) {
|
||||
float x = event.getX(0);
|
||||
float y = event.getY(0);
|
||||
|
||||
@ -287,10 +282,7 @@ public class PanZoomController
|
||||
updatePosition();
|
||||
}
|
||||
|
||||
private void fling(long timestamp) {
|
||||
long timeStep = timestamp - mLastTimestamp;
|
||||
mLastTimestamp = timestamp;
|
||||
|
||||
private void fling() {
|
||||
if (mState != PanZoomState.FLING)
|
||||
mX.velocity = mY.velocity = 0.0f;
|
||||
|
||||
@ -635,7 +627,6 @@ public class PanZoomController
|
||||
@Override
|
||||
public void onScaleEnd(ScaleGestureDetector detector) {
|
||||
mState = PanZoomState.PANNING_HOLD_LOCKED;
|
||||
mLastTimestamp = System.currentTimeMillis();
|
||||
mX.firstTouchPos = mX.touchPos = detector.getFocusX();
|
||||
mY.firstTouchPos = mY.touchPos = detector.getFocusY();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user