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

Unified Diff: cc/base/latency_info_swap_promise_monitor.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 de065d185c0c8fcae8c8dc0a31a5e6f55d9f674c..dc2873988b3ef97b6bb355712e6adf13e68e4074 100644
--- a/cc/base/latency_info_swap_promise_monitor.cc
+++ b/cc/base/latency_info_swap_promise_monitor.cc
@@ -12,14 +12,12 @@
namespace {
-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))
+bool AddRenderingScheduledComponent(ui::LatencyInfo* latency_info) {
+ if (latency_info->FindLatency(
+ ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, nullptr))
return false;
- latency_info->AddLatencyNumber(type, 0, 0);
+ latency_info->AddLatencyNumber(
+ ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, 0);
return true;
}
@@ -50,14 +48,14 @@ LatencyInfoSwapPromiseMonitor::LatencyInfoSwapPromiseMonitor(
LatencyInfoSwapPromiseMonitor::~LatencyInfoSwapPromiseMonitor() {}
void LatencyInfoSwapPromiseMonitor::OnSetNeedsCommitOnMain() {
- if (AddRenderingScheduledComponent(latency_, true /* on_main */)) {
+ if (AddRenderingScheduledComponent(latency_)) {
scoped_ptr<SwapPromise> swap_promise(new LatencyInfoSwapPromise(*latency_));
layer_tree_host_->QueueSwapPromise(swap_promise.Pass());
}
}
void LatencyInfoSwapPromiseMonitor::OnSetNeedsRedrawOnImpl() {
- if (AddRenderingScheduledComponent(latency_, false /* on_main */)) {
+ if (AddRenderingScheduledComponent(latency_)) {
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