OLD | NEW |
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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/debug/trace_event_synthetic_delay.h" | 10 #include "base/debug/trace_event_synthetic_delay.h" |
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 } else { | 1070 } else { |
1071 latency_info_.push_back(latency_info); | 1071 latency_info_.push_back(latency_info); |
1072 } | 1072 } |
1073 | 1073 |
1074 base::TimeDelta now = base::TimeDelta::FromInternalValue( | 1074 base::TimeDelta now = base::TimeDelta::FromInternalValue( |
1075 base::TimeTicks::Now().ToInternalValue()); | 1075 base::TimeTicks::Now().ToInternalValue()); |
1076 | 1076 |
1077 int64 delta = static_cast<int64>( | 1077 int64 delta = static_cast<int64>( |
1078 (now.InSecondsF() - input_event->timeStampSeconds) * | 1078 (now.InSecondsF() - input_event->timeStampSeconds) * |
1079 base::Time::kMicrosecondsPerSecond); | 1079 base::Time::kMicrosecondsPerSecond); |
1080 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.Renderer", delta, 0, 1000000, 100); | 1080 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.AggregatedLatency.Renderer2", |
| 1081 delta, 0, 10000000, 100); |
1081 base::HistogramBase* counter_for_type = | 1082 base::HistogramBase* counter_for_type = |
1082 base::Histogram::FactoryGet( | 1083 base::Histogram::FactoryGet( |
1083 base::StringPrintf("Event.Latency.Renderer.%s", event_name), | 1084 base::StringPrintf("Event.Latency.Renderer2.%s", event_name), |
1084 0, | 1085 0, |
1085 1000000, | 1086 10000000, |
1086 100, | 1087 100, |
1087 base::HistogramBase::kUmaTargetedHistogramFlag); | 1088 base::HistogramBase::kUmaTargetedHistogramFlag); |
1088 counter_for_type->Add(delta); | 1089 counter_for_type->Add(delta); |
1089 | 1090 |
1090 bool prevent_default = false; | 1091 bool prevent_default = false; |
1091 if (WebInputEvent::isMouseEventType(input_event->type)) { | 1092 if (WebInputEvent::isMouseEventType(input_event->type)) { |
1092 const WebMouseEvent& mouse_event = | 1093 const WebMouseEvent& mouse_event = |
1093 *static_cast<const WebMouseEvent*>(input_event); | 1094 *static_cast<const WebMouseEvent*>(input_event); |
1094 TRACE_EVENT2("renderer", "HandleMouseMove", | 1095 TRACE_EVENT2("renderer", "HandleMouseMove", |
1095 "x", mouse_event.x, "y", mouse_event.y); | 1096 "x", mouse_event.x, "y", mouse_event.y); |
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2884 surface_id(), | 2885 surface_id(), |
2885 GetURLForGraphicsContext3D(), | 2886 GetURLForGraphicsContext3D(), |
2886 gpu_channel_host.get(), | 2887 gpu_channel_host.get(), |
2887 attributes, | 2888 attributes, |
2888 false /* bind generates resources */, | 2889 false /* bind generates resources */, |
2889 limits)); | 2890 limits)); |
2890 return context.Pass(); | 2891 return context.Pass(); |
2891 } | 2892 } |
2892 | 2893 |
2893 } // namespace content | 2894 } // namespace content |
OLD | NEW |