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

Issue 252663002: Track plugin input event latency (Closed)

Created:
6 years, 8 months ago by Yufeng Shen (Slow to review)
Modified:
6 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, Peng, jbauman, danakj
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Track plugin input event latency This CL uses LatencyInfo to track the plugin input event latency. 1.Each plugin input event has an associated LatencyInfo which includes some important components from its according ui::Event/WebInputEvent's LatencyInfo. To do that, during the scope of RenderWidget::OnHandleInputEvent(WebInputEvent, latency_info) we first cache the WebInputEvent's latency_info, then if the input event needs to be routed to plugin, we copy the important components from the cached latency_info into the plugin input event's LatencyInfo. 2.A private API InputEventPrivate::TraceInputLatency(bool has_damage) is exposed. 3.If the event is believed to cause rendering damage, private_event.TraceInputLatency(true) can be called, and the input event's LatencyInfo will be sent to renderer with next plugin frame and be tracked until it reaches screen. If the event is believed to not cause any rendering damage, private_event.TraceInputLatency(false) can be called, and the LatencyInfo tracking ends right at the call. BUG=355719 TEST=with custom test touch drawing plugin, input-to-swapbuffer latency is shown correctly in trace viewer. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272990

Patch Set 1 #

Patch Set 2 : add more comments #

Total comments: 12

Patch Set 3 : move all the latency tracking code into host side #

Patch Set 4 : add an plugin API InputEventPrivate::TraceLatencyInfo() #

Patch Set 5 : add ui/events/latency_info_param_traits_macros.h #

Total comments: 5

Patch Set 6 : add StartTrackingLatency(), remove example, add browser_tests #

Patch Set 7 : fix interfaces_ppb_private.h #

Patch Set 8 : move InputEventPriavte interface to terfaces_ppb_private.h #

Total comments: 7

Patch Set 9 : move StartTrackingLatency() to InputEventPrivate #

Total comments: 2

Patch Set 10 : change PP_instance to InstanceHandle in StartTrackingLatency #

Total comments: 3

Patch Set 11 : simplied latency_info ipc dependency #

Patch Set 12 : fix tests #

Patch Set 13 : reupload some missing files #

Patch Set 14 : update dependency #

Patch Set 15 : fix win & mac build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+538 lines, -13 lines) Patch
M chrome/browser/component_updater/ppapi_utils.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_graphics_2d_host.h View 3 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_graphics_2d_host.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_graphics_2d_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +55 lines, -0 lines 0 comments Download
M content/renderer/pepper/plugin_module.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +7 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -0 lines 0 comments Download
M mojo/examples/pepper_container_app/plugin_instance.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M mojo/examples/pepper_container_app/plugin_instance.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/mojo_examples.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
A ppapi/api/private/ppb_input_event_private.idl View 1 2 3 4 5 6 7 8 9 10 12 1 chunk +54 lines, -0 lines 0 comments Download
M ppapi/c/pp_macros.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
A ppapi/c/private/ppb_input_event_private.h View 1 2 3 4 5 6 7 8 9 10 12 1 chunk +78 lines, -0 lines 0 comments Download
A ppapi/cpp/private/input_event_private.h View 1 2 3 4 5 6 7 8 9 12 1 chunk +27 lines, -0 lines 0 comments Download
A ppapi/cpp/private/input_event_private.cc View 1 2 3 4 5 6 7 8 9 12 1 chunk +44 lines, -0 lines 0 comments Download
M ppapi/native_client/native_client.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -0 lines 0 comments Download
M ppapi/ppapi_internal.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +7 lines, -0 lines 0 comments Download
M ppapi/ppapi_proxy_nacl.gyp View 3 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/ppapi_shared.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/ppapi_sources.gypi View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M ppapi/proxy/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/proxy/graphics_2d_resource.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M ppapi/proxy/interface_list.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +6 lines, -1 line 0 comments Download
M ppapi/proxy/ppb_instance_proxy.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.cc View 1 2 3 4 5 3 chunks +13 lines, -0 lines 0 comments Download
M ppapi/shared_impl/DEPS View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/shared_impl/ppapi_globals.h View 1 2 3 4 chunks +15 lines, -0 lines 0 comments Download
M ppapi/shared_impl/ppapi_globals.cc View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M ppapi/shared_impl/ppb_input_event_shared.h View 1 2 3 4 5 3 chunks +4 lines, -0 lines 0 comments Download
M ppapi/shared_impl/ppb_input_event_shared.cc View 1 2 3 4 5 2 chunks +15 lines, -0 lines 0 comments Download
M ppapi/tests/all_c_includes.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/tests/test_input_event.h View 1 2 3 4 5 3 chunks +5 lines, -0 lines 0 comments Download
M ppapi/tests/test_input_event.cc View 1 2 3 4 5 6 chunks +33 lines, -1 line 0 comments Download
M ppapi/thunk/interfaces_ppb_private.h View 1 2 3 4 5 7 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_input_event_api.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_input_event_private_thunk.cc View 1 2 3 4 5 12 1 chunk +42 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_instance_api.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +1 line, -0 lines 0 comments Download
M ui/events/latency_info.h View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M ui/events/latency_info.cc View 4 chunks +5 lines, -1 line 0 comments Download
M ui/events/latency_info_nacl.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +37 lines, -1 line 0 comments Download

Messages

Total messages: 59 (0 generated)
Yufeng Shen (Slow to review)
6 years, 8 months ago (2014-04-25 01:07:08 UTC) #1
piman
https://codereview.chromium.org/252663002/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/252663002/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode1102 content/renderer/pepper/pepper_plugin_instance_impl.cc:1102: render_frame_->GetRenderWidget()->current_event_latency_info(); In the future (e.g. after the blink merge), ...
6 years, 8 months ago (2014-04-25 01:59:43 UTC) #2
sadrul
https://codereview.chromium.org/252663002/diff/20001/ui/events/latency_info.h File ui/events/latency_info.h (right): https://codereview.chromium.org/252663002/diff/20001/ui/events/latency_info.h#newcode73 ui/events/latency_info.h:73: LATENCY_COMPONENT_TYPE_LAST = LATENCY_INFO_LIST_TERMINATED_OVERFLOW_COMPONENT You need to update this.
6 years, 8 months ago (2014-04-25 12:09:12 UTC) #3
Yufeng Shen (Slow to review)
I moved all the ppapi/ side latency monitoring code to the host side so it ...
6 years, 8 months ago (2014-04-25 20:42:41 UTC) #4
Yufeng Shen (Slow to review)
On 2014/04/25 20:42:41, Yufeng Shen wrote: > I moved all the ppapi/ side latency monitoring ...
6 years, 8 months ago (2014-04-25 20:44:34 UTC) #5
piman
I don't think doing it on the host side will give you the right results. ...
6 years, 8 months ago (2014-04-25 20:58:05 UTC) #6
chromium-reviews
Do we have the same problem even if we do the tracking in plugin side ...
6 years, 8 months ago (2014-04-25 21:08:04 UTC) #7
chromium-reviews
A more accurate way I can think of is to expose an API that the ...
6 years, 8 months ago (2014-04-25 21:46:28 UTC) #8
dmichael (off chromium)
On Fri, Apr 25, 2014 at 3:46 PM, 'Yufeng Shen <miletus@google.com>' via Chromium-reviews <chromium-reviews@chromium.org> wrote: ...
6 years, 8 months ago (2014-04-25 22:24:15 UTC) #9
piman
On Fri, Apr 25, 2014 at 2:46 PM, Yufeng Shen <miletus@google.com> wrote: > A more ...
6 years, 8 months ago (2014-04-25 22:25:45 UTC) #10
Yufeng Shen (Slow to review)
Based on your guys's comments, I decide to go with adding a new private API ...
6 years, 7 months ago (2014-05-01 21:29:51 UTC) #11
Yufeng Shen (Slow to review)
David, how does this API change look to you ?
6 years, 7 months ago (2014-05-05 19:41:09 UTC) #12
dmichael (off chromium)
The API looks reasonable at a glance to me. I've just started looking at the ...
6 years, 7 months ago (2014-05-05 20:18:50 UTC) #13
dmichael (off chromium)
https://codereview.chromium.org/252663002/diff/80001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/252663002/diff/80001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode1127 content/renderer/pepper/pepper_plugin_instance_impl.cc:1127: InitLatencyInfo(&events[i].latency_info, You're doing some work here even if the ...
6 years, 7 months ago (2014-05-05 22:20:32 UTC) #14
Yufeng Shen (Slow to review)
1.StartTrackingLatency() added. 2.Example removed. 3.Browser test added. PTAL. https://codereview.chromium.org/252663002/diff/80001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/252663002/diff/80001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode1127 content/renderer/pepper/pepper_plugin_instance_impl.cc:1127: InitLatencyInfo(&events[i].latency_info, ...
6 years, 7 months ago (2014-05-07 17:12:13 UTC) #15
dmichael (off chromium)
On 2014/05/07 17:12:13, Yufeng Shen wrote: > 1.StartTrackingLatency() added. > 2.Example removed. > 3.Browser test ...
6 years, 7 months ago (2014-05-07 22:59:23 UTC) #16
Yufeng Shen (Slow to review)
On 2014/05/07 22:59:23, dmichael wrote: > On 2014/05/07 17:12:13, Yufeng Shen wrote: > > 1.StartTrackingLatency() ...
6 years, 7 months ago (2014-05-07 23:40:57 UTC) #17
dmichael (off chromium)
https://codereview.chromium.org/252663002/diff/140001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/252663002/diff/140001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode2551 content/renderer/pepper/pepper_plugin_instance_impl.cc:2551: is_tracking_latency_ = true; Please add a permissions check for ...
6 years, 7 months ago (2014-05-08 21:47:07 UTC) #18
Yufeng Shen (Slow to review)
https://codereview.chromium.org/252663002/diff/140001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/252663002/diff/140001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode2551 content/renderer/pepper/pepper_plugin_instance_impl.cc:2551: is_tracking_latency_ = true; On 2014/05/08 21:47:07, dmichael wrote: > ...
6 years, 7 months ago (2014-05-08 23:49:39 UTC) #19
Rick Byers
On 2014/05/07 23:40:57, Yufeng Shen wrote: > On 2014/05/07 22:59:23, dmichael wrote: > > On ...
6 years, 7 months ago (2014-05-09 13:24:57 UTC) #20
chromium-reviews
On Fri, May 9, 2014 at 9:24 AM, <rbyers@chromium.org> wrote: > On 2014/05/07 23:40:57, Yufeng ...
6 years, 7 months ago (2014-05-09 13:43:06 UTC) #21
dmichael (off chromium)
lgtm https://codereview.chromium.org/252663002/diff/140001/ppapi/shared_impl/ppb_input_event_shared.cc File ppapi/shared_impl/ppb_input_event_shared.cc (right): https://codereview.chromium.org/252663002/diff/140001/ppapi/shared_impl/ppb_input_event_shared.cc#newcode198 ppapi/shared_impl/ppb_input_event_shared.cc:198: 0, NULL)) On 2014/05/08 23:49:40, Yufeng Shen wrote: ...
6 years, 7 months ago (2014-05-09 15:19:32 UTC) #22
Yufeng Shen (Slow to review)
piman@ : mind taking a look at content/ ? sadrul@: mind taking a look at ...
6 years, 7 months ago (2014-05-12 21:53:06 UTC) #23
piman
https://codereview.chromium.org/252663002/diff/180001/content/common/content_param_traits_macros.h File content/common/content_param_traits_macros.h (right): https://codereview.chromium.org/252663002/diff/180001/content/common/content_param_traits_macros.h#newcode39 content/common/content_param_traits_macros.h:39: #include "ui/events/latency_info_param_traits_macros.h" include at the top https://codereview.chromium.org/252663002/diff/180001/ppapi/proxy/ppapi_messages.h File ppapi/proxy/ppapi_messages.h ...
6 years, 7 months ago (2014-05-12 22:10:35 UTC) #24
Yufeng Shen (Slow to review)
https://codereview.chromium.org/252663002/diff/180001/ppapi/proxy/ppapi_messages.h File ppapi/proxy/ppapi_messages.h (right): https://codereview.chromium.org/252663002/diff/180001/ppapi/proxy/ppapi_messages.h#newcode80 ppapi/proxy/ppapi_messages.h:80: #endif On 2014/05/12 22:10:36, piman wrote: > ppapi can't ...
6 years, 7 months ago (2014-05-13 00:16:15 UTC) #25
piman
On Mon, May 12, 2014 at 5:16 PM, <miletus@chromium.org> wrote: > > https://codereview.chromium.org/252663002/diff/180001/ > ppapi/proxy/ppapi_messages.h ...
6 years, 7 months ago (2014-05-13 00:31:40 UTC) #26
Yufeng Shen (Slow to review)
On 2014/05/13 00:31:40, piman wrote: > On Mon, May 12, 2014 at 5:16 PM, <mailto:miletus@chromium.org> ...
6 years, 7 months ago (2014-05-13 01:35:33 UTC) #27
sadrul
> > > Also I can't move the IPC traits into ui/events/ since that will ...
6 years, 7 months ago (2014-05-14 03:15:18 UTC) #28
Yufeng Shen (Slow to review)
On 2014/05/14 03:15:18, sadrul wrote: > > > > Also I can't move the IPC ...
6 years, 7 months ago (2014-05-20 22:44:30 UTC) #29
piman
lgtm
6 years, 7 months ago (2014-05-20 23:07:59 UTC) #30
Yufeng Shen (Slow to review)
add asvitkine@ for OWNER of tools/metrics/
6 years, 7 months ago (2014-05-20 23:22:21 UTC) #31
Alexei Svitkine (slow)
histograms.xml lgtm
6 years, 7 months ago (2014-05-21 05:03:19 UTC) #32
sadrul
lgtm
6 years, 7 months ago (2014-05-21 05:15:13 UTC) #33
Yufeng Shen (Slow to review)
The CQ bit was checked by miletus@chromium.org
6 years, 7 months ago (2014-05-21 23:22:05 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/252663002/200001
6 years, 7 months ago (2014-05-21 23:23:58 UTC) #35
Yufeng Shen (Slow to review)
oops, missing OWNER of ppapi/proxy/ppapi_messages.h + tsepez@
6 years, 7 months ago (2014-05-21 23:43:46 UTC) #36
Tom Sepez
Messages LGTM.
6 years, 7 months ago (2014-05-21 23:47:55 UTC) #37
Yufeng Shen (Slow to review)
The CQ bit was unchecked by miletus@chromium.org
6 years, 7 months ago (2014-05-21 23:50:18 UTC) #38
Yufeng Shen (Slow to review)
The CQ bit was checked by miletus@chromium.org
6 years, 7 months ago (2014-05-21 23:50:33 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/252663002/200001
6 years, 7 months ago (2014-05-21 23:53:17 UTC) #40
Yufeng Shen (Slow to review)
The CQ bit was checked by miletus@chromium.org
6 years, 7 months ago (2014-05-22 00:43:21 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/252663002/220001
6 years, 7 months ago (2014-05-22 00:48:53 UTC) #42
Yufeng Shen (Slow to review)
The CQ bit was checked by miletus@chromium.org
6 years, 7 months ago (2014-05-22 01:12:59 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/252663002/240001
6 years, 7 months ago (2014-05-22 01:17:22 UTC) #44
miletus1
The CQ bit was checked by miletus@google.com
6 years, 7 months ago (2014-05-22 03:47:41 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/252663002/260001
6 years, 7 months ago (2014-05-22 03:50:16 UTC) #46
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-22 09:54:02 UTC) #47
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-22 10:04:41 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/144900)
6 years, 7 months ago (2014-05-22 10:04:42 UTC) #49
Yufeng Shen (Slow to review)
The CQ bit was checked by miletus@chromium.org
6 years, 7 months ago (2014-05-27 00:06:31 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/252663002/280001
6 years, 7 months ago (2014-05-27 00:06:56 UTC) #51
Yufeng Shen (Slow to review)
+sky@ for OWNER of mojo/mojo_examples.gypi
6 years, 7 months ago (2014-05-27 00:12:51 UTC) #52
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-27 03:35:37 UTC) #53
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-27 03:39:24 UTC) #54
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/69791)
6 years, 7 months ago (2014-05-27 03:39:24 UTC) #55
sky
LGTM
6 years, 7 months ago (2014-05-27 16:41:17 UTC) #56
Yufeng Shen (Slow to review)
The CQ bit was checked by miletus@chromium.org
6 years, 7 months ago (2014-05-27 16:41:37 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/252663002/280001
6 years, 7 months ago (2014-05-27 16:42:10 UTC) #58
commit-bot: I haz the power
6 years, 7 months ago (2014-05-27 16:56:47 UTC) #59
Message was sent while issue was closed.
Change committed as 272990

Powered by Google App Engine
This is Rietveld 408576698