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

Unified Diff: cc/base/latency_info_swap_promise_monitor.cc

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 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
« no previous file with comments | « cc/animation/transform_operations.cc ('k') | cc/blink/cc_blink_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/latency_info_swap_promise_monitor.cc
diff --git a/cc/base/latency_info_swap_promise_monitor.cc b/cc/base/latency_info_swap_promise_monitor.cc
index dc2873988b3ef97b6bb355712e6adf13e68e4074..de065d185c0c8fcae8c8dc0a31a5e6f55d9f674c 100644
--- a/cc/base/latency_info_swap_promise_monitor.cc
+++ b/cc/base/latency_info_swap_promise_monitor.cc
@@ -12,12 +12,14 @@
namespace {
-bool AddRenderingScheduledComponent(ui::LatencyInfo* latency_info) {
- if (latency_info->FindLatency(
- ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, nullptr))
+bool AddRenderingScheduledComponent(ui::LatencyInfo* latency_info,
+ bool on_main) {
+ ui::LatencyComponentType type = on_main ?
+ ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN_COMPONENT :
+ ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL_COMPONENT;
+ if (latency_info->FindLatency(type, 0, nullptr))
return false;
- latency_info->AddLatencyNumber(
- ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, 0);
+ latency_info->AddLatencyNumber(type, 0, 0);
return true;
}
@@ -48,14 +50,14 @@ LatencyInfoSwapPromiseMonitor::LatencyInfoSwapPromiseMonitor(
LatencyInfoSwapPromiseMonitor::~LatencyInfoSwapPromiseMonitor() {}
void LatencyInfoSwapPromiseMonitor::OnSetNeedsCommitOnMain() {
- if (AddRenderingScheduledComponent(latency_)) {
+ if (AddRenderingScheduledComponent(latency_, true /* on_main */)) {
scoped_ptr<SwapPromise> swap_promise(new LatencyInfoSwapPromise(*latency_));
layer_tree_host_->QueueSwapPromise(swap_promise.Pass());
}
}
void LatencyInfoSwapPromiseMonitor::OnSetNeedsRedrawOnImpl() {
- if (AddRenderingScheduledComponent(latency_)) {
+ if (AddRenderingScheduledComponent(latency_, false /* on_main */)) {
scoped_ptr<SwapPromise> swap_promise(new LatencyInfoSwapPromise(*latency_));
layer_tree_host_impl_->active_tree()->QueueSwapPromise(swap_promise.Pass());
}
« no previous file with comments | « cc/animation/transform_operations.cc ('k') | cc/blink/cc_blink_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698