Added LatencyTimer to ease latency measurements

new file:   core/java/android/os/LatencyTimer.java
	modified:   core/java/android/view/MotionEvent.java
	modified:   core/java/android/view/ViewRoot.java
	modified:   services/java/com/android/server/InputDevice.java
	modified:   services/java/com/android/server/KeyInputQueue.java
	modified:   services/java/com/android/server/WindowManagerService.java
This commit is contained in:
Michael Chan
2009-05-13 17:29:48 -07:00
parent 4eebf590a3
commit 53071d6d15
6 changed files with 270 additions and 27 deletions

View File

@@ -63,7 +63,7 @@ public class InputDevice {
yMoveScale = my != 0 ? (1.0f/my) : 1.0f;
}
MotionEvent generateMotion(InputDevice device, long curTime,
MotionEvent generateMotion(InputDevice device, long curTime, long curTimeNano,
boolean isAbs, Display display, int orientation,
int metaState) {
if (!changed) {
@@ -167,7 +167,7 @@ public class InputDevice {
if (!isAbs) {
x = y = 0;
}
return MotionEvent.obtain(downTime, curTime, action,
return MotionEvent.obtainNano(downTime, curTime, curTimeNano, action,
scaledX, scaledY, scaledPressure, scaledSize, metaState,
xPrecision, yPrecision, device.id, edgeFlags);
} else {
@@ -181,7 +181,7 @@ public class InputDevice {
}
return null;
}
MotionEvent me = MotionEvent.obtain(downTime, curTime,
MotionEvent me = MotionEvent.obtainNano(downTime, curTime, curTimeNano,
MotionEvent.ACTION_MOVE, scaledX, scaledY,
scaledPressure, scaledSize, metaState,
xPrecision, yPrecision, device.id, edgeFlags);