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

Side by Side Diff: cc/trees/latency_info_swap_promise_monitor.cc

Issue 2953073002: LatencyInfo trace_id_ no longer dependent on sequence_number. (Closed)
Patch Set: Fix cc_unittests Created 3 years, 6 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698