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

Unified Diff: cc/trees/proxy_main.cc

Issue 2188093002: cc: Complete swap promise for aborted commit after pending activation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: post rebase fix Created 4 years, 4 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/trees/proxy_impl.cc ('k') | cc/trees/remote_channel_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy_main.cc
diff --git a/cc/trees/proxy_main.cc b/cc/trees/proxy_main.cc
index 6e1de7fc97d9c63c8069e09d2304ad4c4584c27b..2b789944c76885aac7f8f89f6ce0d5b13e81bec0 100644
--- a/cc/trees/proxy_main.cc
+++ b/cc/trees/proxy_main.cc
@@ -145,9 +145,10 @@ void ProxyMain::BeginMainFrame(
if (defer_commits_) {
TRACE_EVENT_INSTANT0("cc", "EarlyOut_DeferCommit",
TRACE_EVENT_SCOPE_THREAD);
+ std::vector<std::unique_ptr<SwapPromise>> empty_swap_promises;
channel_main_->BeginMainFrameAbortedOnImpl(
CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT,
- begin_main_frame_start_time);
+ begin_main_frame_start_time, std::move(empty_swap_promises));
return;
}
@@ -161,17 +162,20 @@ void ProxyMain::BeginMainFrame(
if (!layer_tree_host_->visible()) {
TRACE_EVENT_INSTANT0("cc", "EarlyOut_NotVisible", TRACE_EVENT_SCOPE_THREAD);
+ std::vector<std::unique_ptr<SwapPromise>> empty_swap_promises;
channel_main_->BeginMainFrameAbortedOnImpl(
- CommitEarlyOutReason::ABORTED_NOT_VISIBLE, begin_main_frame_start_time);
+ CommitEarlyOutReason::ABORTED_NOT_VISIBLE, begin_main_frame_start_time,
+ std::move(empty_swap_promises));
return;
}
if (layer_tree_host_->output_surface_lost()) {
TRACE_EVENT_INSTANT0("cc", "EarlyOut_OutputSurfaceLost",
TRACE_EVENT_SCOPE_THREAD);
+ std::vector<std::unique_ptr<SwapPromise>> empty_swap_promises;
channel_main_->BeginMainFrameAbortedOnImpl(
CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST,
- begin_main_frame_start_time);
+ begin_main_frame_start_time, std::move(empty_swap_promises));
return;
}
@@ -215,7 +219,8 @@ void ProxyMain::BeginMainFrame(
if (!updated && can_cancel_this_commit) {
TRACE_EVENT_INSTANT0("cc", "EarlyOut_NoUpdates", TRACE_EVENT_SCOPE_THREAD);
channel_main_->BeginMainFrameAbortedOnImpl(
- CommitEarlyOutReason::FINISHED_NO_UPDATES, begin_main_frame_start_time);
+ CommitEarlyOutReason::FINISHED_NO_UPDATES, begin_main_frame_start_time,
+ layer_tree_host_->TakeSwapPromises());
// Although the commit is internally aborted, this is because it has been
// detected to be a no-op. From the perspective of an embedder, this commit
@@ -223,7 +228,6 @@ void ProxyMain::BeginMainFrame(
current_pipeline_stage_ = NO_PIPELINE_STAGE;
layer_tree_host_->CommitComplete();
layer_tree_host_->DidBeginMainFrame();
- layer_tree_host_->BreakSwapPromises(SwapPromise::COMMIT_NO_UPDATE);
return;
}
« no previous file with comments | « cc/trees/proxy_impl.cc ('k') | cc/trees/remote_channel_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698