OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H
_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H
_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H
_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H
_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 InputEventAckState ack_result); | 50 InputEventAckState ack_result); |
51 | 51 |
52 // Populates renderer-created LatencyInfo entries with the appropriate latency | 52 // Populates renderer-created LatencyInfo entries with the appropriate latency |
53 // component id. Called when the RenderWidgetHost receives a compositor swap | 53 // component id. Called when the RenderWidgetHost receives a compositor swap |
54 // update from the renderer. | 54 // update from the renderer. |
55 void OnSwapCompositorFrame(std::vector<ui::LatencyInfo>* latencies); | 55 void OnSwapCompositorFrame(std::vector<ui::LatencyInfo>* latencies); |
56 | 56 |
57 // Terminates latency tracking for events that triggered rendering, also | 57 // Terminates latency tracking for events that triggered rendering, also |
58 // performing relevant UMA latency reporting. | 58 // performing relevant UMA latency reporting. |
59 // Called when the RenderWidgetHost receives a swap update from the GPU. | 59 // Called when the RenderWidgetHost receives a swap update from the GPU. |
60 void OnFrameSwapped(const ui::LatencyInfo& latency); | 60 void OnGpuSwapBuffersCompleted(const ui::LatencyInfo& latency); |
61 | 61 |
62 // WebInputEvent coordinates are in DPIs, while LatencyInfo expects | 62 // WebInputEvent coordinates are in DPIs, while LatencyInfo expects |
63 // coordinates in device pixels. | 63 // coordinates in device pixels. |
64 void set_device_scale_factor(float device_scale_factor) { | 64 void set_device_scale_factor(float device_scale_factor) { |
65 device_scale_factor_ = device_scale_factor; | 65 device_scale_factor_ = device_scale_factor; |
66 } | 66 } |
67 | 67 |
68 // Returns the ID that uniquely describes this component to the latency | 68 // Returns the ID that uniquely describes this component to the latency |
69 // subsystem. | 69 // subsystem. |
70 int64_t latency_component_id() const { return latency_component_id_; } | 70 int64_t latency_component_id() const { return latency_component_id_; } |
(...skipping 15 matching lines...) Expand all Loading... |
86 bool touch_start_default_prevented_; | 86 bool touch_start_default_prevented_; |
87 | 87 |
88 RenderWidgetHostDelegate* render_widget_host_delegate_; | 88 RenderWidgetHostDelegate* render_widget_host_delegate_; |
89 | 89 |
90 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker); | 90 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace content | 93 } // namespace content |
94 | 94 |
95 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKE
R_H_ | 95 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKE
R_H_ |
OLD | NEW |