summaryrefslogtreecommitdiffstats
path: root/WebKit/android/plugins/PluginDebugAndroid.cpp
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2010-02-23 14:55:21 -0500
committerDerek Sollenberger <djsollen@google.com>2010-02-23 14:55:21 -0500
commitc94925d6f6ccb59d410c22420372e168bab4acdf (patch)
tree525e5d494299fde9cce5d618155847c7f7521586 /WebKit/android/plugins/PluginDebugAndroid.cpp
parent15027de75d16455fd1e449b771fac8fd2cf88233 (diff)
downloadexternal_webkit-c94925d6f6ccb59d410c22420372e168bab4acdf.zip
external_webkit-c94925d6f6ccb59d410c22420372e168bab4acdf.tar.gz
external_webkit-c94925d6f6ccb59d410c22420372e168bab4acdf.tar.bz2
adding logging to determine the delay between event origination and its arrival at the plugin.
Diffstat (limited to 'WebKit/android/plugins/PluginDebugAndroid.cpp')
-rw-r--r--WebKit/android/plugins/PluginDebugAndroid.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/WebKit/android/plugins/PluginDebugAndroid.cpp b/WebKit/android/plugins/PluginDebugAndroid.cpp
index f8a3c50..e783419 100644
--- a/WebKit/android/plugins/PluginDebugAndroid.cpp
+++ b/WebKit/android/plugins/PluginDebugAndroid.cpp
@@ -25,6 +25,7 @@
#include "PluginDebugAndroid.h"
#include "utils/Log.h"
+#include "utils/SystemClock.h"
#include <stdarg.h>
#define ARRAY_COUNT(array) static_cast<int32_t>(sizeof(array) / sizeof(array[0]))
@@ -91,9 +92,13 @@ void anp_logPluginEvent(void* npp, const ANPEvent* evt, int16 returnVal, int ela
case kTouch_ANPEventType:
if(evt->data.touch.action < ARRAY_COUNT(inputActions)) {
- anp_logPlugin("%p EVENT::TOUCH[%d] time=%d action=%s [%d %d]", npp,
- returnVal, elapsedTime,inputActions[evt->data.touch.action],
- evt->data.touch.x, evt->data.touch.y);
+
+ uint32_t totalTime = android::uptimeMillis() - evt->timeStamp;
+
+ anp_logPlugin("%p EVENT::TOUCH[%d] delay=%d time=%d action=%s [%d %d]",
+ npp, returnVal, totalTime - elapsedTime, elapsedTime,
+ inputActions[evt->data.touch.action], evt->data.touch.x,
+ evt->data.touch.y);
} else {
anp_logPlugin("%p EVENT::TOUCH[%d] unknown action", npp, returnVal);
}