| Index: ui/latency/latency_info.h
|
| diff --git a/ui/latency/latency_info.h b/ui/latency/latency_info.h
|
| index f34e09ac8ea47f67560820c47c1ed3e261576b0e..600f8745cd20e61cd800707c3a89d9a17b6e9e08 100644
|
| --- a/ui/latency/latency_info.h
|
| +++ b/ui/latency/latency_info.h
|
| @@ -75,9 +75,10 @@ enum LatencyComponentType {
|
| TAB_SHOW_COMPONENT,
|
| // Timestamp when the frame is swapped in renderer.
|
| INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT,
|
| - // Timestamp of when the browser process receives a buffer swap notification
|
| - // from the renderer.
|
| - INPUT_EVENT_BROWSER_RECEIVED_RENDERER_SWAP_COMPONENT,
|
| + // Timestamp of when the display compositor receives a compositor frame from
|
| + // the renderer.
|
| + // Display compositor can be either in the browser process or in Mus.
|
| + DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT,
|
| // Timestamp of when the gpu service began swap buffers, unlike
|
| // INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT which measures after.
|
| INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT,
|
| @@ -193,6 +194,12 @@ class LatencyInfo {
|
| int64_t id,
|
| LatencyComponent* output) const;
|
|
|
| + // Returns true if a component with |type| is found in the latency component.
|
| + // The first such component (when iterating over latency_components_) is
|
| + // stored to |output| if |output| is not NULL. Returns false if no such
|
| + // component is found.
|
| + bool FindLatency(LatencyComponentType type, LatencyComponent* output) const;
|
| +
|
| void RemoveLatency(LatencyComponentType type);
|
|
|
| // Returns true if there is still room for keeping the |input_coordinate|,
|
| @@ -256,6 +263,12 @@ class LatencyInfo {
|
| #endif
|
| };
|
|
|
| +// This is declared here for use in gtest-based unit tests, but is defined in
|
| +// //ui/latency:test_support target.
|
| +// Without this the default PrintTo template in gtest tries to pass LatencyInfo
|
| +// by value, which leads to an alignment compile error on Windows.
|
| +void PrintTo(const LatencyInfo& latency, ::std::ostream* os);
|
| +
|
| } // namespace ui
|
|
|
| #endif // UI_LATENCY_LATENCY_INFO_H_
|
|
|