Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(696)

Unified Diff: ppapi/shared_impl/ppb_input_event_shared.cc

Issue 252663002: Track plugin input event latency (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move InputEventPriavte interface to terfaces_ppb_private.h Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/shared_impl/ppb_input_event_shared.cc
diff --git a/ppapi/shared_impl/ppb_input_event_shared.cc b/ppapi/shared_impl/ppb_input_event_shared.cc
index 3443759351f17f6e6d9b29f470e25ecada86eee9..ef4e719ce35885ec5996ffebf728d76237537c3f 100644
--- a/ppapi/shared_impl/ppb_input_event_shared.cc
+++ b/ppapi/shared_impl/ppb_input_event_shared.cc
@@ -4,6 +4,7 @@
#include "ppapi/shared_impl/ppb_input_event_shared.h"
+#include "ppapi/shared_impl/ppapi_globals.h"
#include "ppapi/shared_impl/var.h"
using ppapi::thunk::PPB_InputEvent_API;
@@ -191,6 +192,20 @@ PP_TouchPoint PPB_InputEvent_Shared::GetTouchById(PP_TouchListType list,
return PP_MakeTouchPoint();
}
+PP_Bool PPB_InputEvent_Shared::TraceInputLatency(PP_Bool has_damage) {
+ ui::LatencyInfo latency = data_.latency_info;
+ if (!latency.FindLatency(ui::INPUT_EVENT_LATENCY_BEGIN_PLUGIN_COMPONENT,
+ 0, NULL))
dmichael (off chromium) 2014/05/08 21:47:07 So the call to TraceInputLatency is coming from th
Yufeng Shen (Slow to review) 2014/05/08 23:49:40 hmm, not sure what confuses you. The LatencyInfo i
dmichael (off chromium) 2014/05/09 15:19:33 OK, got it. I was forgetting about it riding along
+ return PP_FALSE;
+ if (has_damage) {
+ PpapiGlobals::Get()->AddLatencyInfo(latency, pp_instance());
+ } else {
+ latency.AddLatencyNumber(
+ ui::INPUT_EVENT_LATENCY_TERMINATED_PLUGIN_COMPONENT, 0, 0);
+ }
+ return PP_TRUE;
+}
+
// static
PP_Resource PPB_InputEvent_Shared::CreateIMEInputEvent(
ResourceObjectType type,

Powered by Google App Engine
This is Rietveld 408576698