Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/trees/latency_info_swap_promise_monitor.h" | 5 #include "cc/trees/latency_info_swap_promise_monitor.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
| 10 #include "cc/output/latency_info_swap_promise.h" | 10 #include "cc/output/latency_info_swap_promise.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 (reinterpret_cast<uint64_t>(this) << 32)) | | 83 (reinterpret_cast<uint64_t>(this) << 32)) | |
| 84 (it->second.sequence_number & 0xffffffff); | 84 (it->second.sequence_number & 0xffffffff); |
| 85 if (new_sequence_number == it->second.sequence_number) | 85 if (new_sequence_number == it->second.sequence_number) |
| 86 return; | 86 return; |
| 87 break; | 87 break; |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 if (!new_sequence_number) | 90 if (!new_sequence_number) |
| 91 return; | 91 return; |
| 92 ui::LatencyInfo new_latency; | 92 ui::LatencyInfo new_latency; |
| 93 new_latency.CopyLatencyFrom( | |
| 94 *latency_, | |
| 95 ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT); | |
|
brianderson
2017/06/27 18:00:58
The new order here seems more intuitive, but how d
tdresser
2017/06/27 18:33:11
Both CopyLatencyFrom and AddLatencyNumberWithTrace
| |
| 93 new_latency.AddLatencyNumberWithTraceName( | 96 new_latency.AddLatencyNumberWithTraceName( |
| 94 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 0, | 97 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 0, |
| 95 new_sequence_number, "ScrollUpdate"); | 98 new_sequence_number, "ScrollUpdate"); |
| 96 new_latency.CopyLatencyFrom( | |
| 97 *latency_, | |
| 98 ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT); | |
| 99 std::unique_ptr<SwapPromise> swap_promise( | 99 std::unique_ptr<SwapPromise> swap_promise( |
| 100 new LatencyInfoSwapPromise(new_latency)); | 100 new LatencyInfoSwapPromise(new_latency)); |
| 101 layer_tree_host_impl_->QueueSwapPromiseForMainThreadScrollUpdate( | 101 layer_tree_host_impl_->QueueSwapPromiseForMainThreadScrollUpdate( |
| 102 std::move(swap_promise)); | 102 std::move(swap_promise)); |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace cc | 106 } // namespace cc |
| OLD | NEW |