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

Unified Diff: cc/trees/latency_info_swap_promise_monitor.cc

Issue 2914023002: Remove LatencyInfo::sequence_number. (May break metrics).
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/latency_info_swap_promise_monitor.cc
diff --git a/cc/trees/latency_info_swap_promise_monitor.cc b/cc/trees/latency_info_swap_promise_monitor.cc
index c8e933dac6dc916a50ec6a14cdb197f1bcdb7789..0db6cf243ae8e2d3d5998d8494ce1feec087c93a 100644
--- a/cc/trees/latency_info_swap_promise_monitor.cc
+++ b/cc/trees/latency_info_swap_promise_monitor.cc
@@ -21,7 +21,7 @@ bool AddRenderingScheduledComponent(ui::LatencyInfo* latency_info,
: ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL_COMPONENT;
if (latency_info->FindLatency(type, 0, nullptr))
return false;
- latency_info->AddLatencyNumber(type, 0, 0);
+ latency_info->AddLatencyNumber(type, 0);
return true;
}
@@ -31,7 +31,7 @@ bool AddForwardingScrollUpdateToMainComponent(ui::LatencyInfo* latency_info) {
nullptr))
return false;
latency_info->AddLatencyNumber(
- ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT, 0,
+ ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT,
latency_info->trace_id());
return true;
}
@@ -73,29 +73,13 @@ void LatencyInfoSwapPromiseMonitor::OnSetNeedsRedrawOnImpl() {
void LatencyInfoSwapPromiseMonitor::OnForwardScrollUpdateToMainThreadOnImpl() {
if (AddForwardingScrollUpdateToMainComponent(latency_)) {
- int64_t new_sequence_number = 0;
tdresser 2017/06/29 21:00:37 Sorry, meant to highlight this as a slightly scary
ccameron 2017/06/29 21:06:36 Missed this one. Archeology gives some context at
- for (ui::LatencyInfo::LatencyMap::const_iterator it =
- latency_->latency_components().begin();
- it != latency_->latency_components().end(); ++it) {
- if (it->first.first == ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT) {
- new_sequence_number =
- ((static_cast<int64_t>(base::PlatformThread::CurrentId()) << 32) ^
- (reinterpret_cast<uint64_t>(this) << 32)) |
- (it->second.sequence_number & 0xffffffff);
- if (new_sequence_number == it->second.sequence_number)
- return;
- break;
- }
- }
- if (!new_sequence_number)
- return;
ui::LatencyInfo new_latency;
new_latency.CopyLatencyFrom(
*latency_,
ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT);
new_latency.AddLatencyNumberWithTraceName(
ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 0,
- new_sequence_number, "ScrollUpdate");
+ "ScrollUpdate");
std::unique_ptr<SwapPromise> swap_promise(
new LatencyInfoSwapPromise(new_latency));
layer_tree_host_impl_->QueueSwapPromiseForMainThreadScrollUpdate(

Powered by Google App Engine
This is Rietveld 408576698