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

Side by Side Diff: content/renderer/render_widget.cc

Issue 1239593002: Implement a new flow event API that allows binding flow events and regular events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add support for flow steps. Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 } 1104 }
1105 #endif 1105 #endif
1106 1106
1107 base::AutoReset<const ui::LatencyInfo*> resetter(&current_event_latency_info_, 1107 base::AutoReset<const ui::LatencyInfo*> resetter(&current_event_latency_info_,
1108 &latency_info); 1108 &latency_info);
1109 1109
1110 base::TimeTicks start_time; 1110 base::TimeTicks start_time;
1111 if (base::TimeTicks::IsHighResolution()) 1111 if (base::TimeTicks::IsHighResolution())
1112 start_time = base::TimeTicks::Now(); 1112 start_time = base::TimeTicks::Now();
1113 1113
1114 TRACE_EVENT1("renderer,benchmark", "RenderWidget::OnHandleInputEvent", 1114 TRACE_EVENT_WITH_FLOW1("renderer,benchmark", "RenderWidget::OnHandleInputEvent ",
1115 TRACE_ID_DONT_MANGLE(latency_info.trace_id),
1116 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT,
1115 "event", WebInputEventTraits::GetName(input_event->type)); 1117 "event", WebInputEventTraits::GetName(input_event->type));
1116 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("blink.HandleInputEvent"); 1118 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("blink.HandleInputEvent");
1117 TRACE_EVENT_FLOW_STEP0( 1119 TRACE_EVENT_FLOW_STEP0(
1118 "input,benchmark", 1120 "input,benchmark",
1119 "LatencyInfo.Flow", 1121 "LatencyInfo.Flow",
1120 TRACE_ID_DONT_MANGLE(latency_info.trace_id), 1122 TRACE_ID_DONT_MANGLE(latency_info.trace_id),
1121 "HanldeInputEventMain"); 1123 "HanldeInputEventMain");
1122 1124
1123 // If we don't have a high res timer, these metrics won't be accurate enough 1125 // If we don't have a high res timer, these metrics won't be accurate enough
1124 // to be worth collecting. Note that this does introduce some sampling bias. 1126 // to be worth collecting. Note that this does introduce some sampling bias.
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2470 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2469 video_hole_frames_.AddObserver(frame); 2471 video_hole_frames_.AddObserver(frame);
2470 } 2472 }
2471 2473
2472 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2474 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2473 video_hole_frames_.RemoveObserver(frame); 2475 video_hole_frames_.RemoveObserver(frame);
2474 } 2476 }
2475 #endif // defined(VIDEO_HOLE) 2477 #endif // defined(VIDEO_HOLE)
2476 2478
2477 } // namespace content 2479 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698