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

Unified Diff: cc/trees/remote_channel_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/remote_channel_main.h ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/remote_channel_main.cc
diff --git a/cc/trees/remote_channel_main.cc b/cc/trees/remote_channel_main.cc
index 540acf6727f5c147f6a332e717168c5664fd5dae..b9db7fa5f9d6f45162cf7bb4b15276b78acb5847 100644
--- a/cc/trees/remote_channel_main.cc
+++ b/cc/trees/remote_channel_main.cc
@@ -155,7 +155,8 @@ void RemoteChannelMain::SetNeedsCommitOnImpl() {
void RemoteChannelMain::BeginMainFrameAbortedOnImpl(
CommitEarlyOutReason reason,
- base::TimeTicks main_thread_start_time) {
+ base::TimeTicks main_thread_start_time,
+ std::vector<std::unique_ptr<SwapPromise>> swap_promises) {
TRACE_EVENT1("cc.remote", "RemoteChannelMain::BeginMainFrameAbortedOnImpl",
"reason", CommitEarlyOutReasonToString(reason));
proto::CompositorMessage proto;
@@ -170,6 +171,12 @@ void RemoteChannelMain::BeginMainFrameAbortedOnImpl(
VLOG(1) << "Sending BeginMainFrameAborted message to client with reason: "
<< CommitEarlyOutReasonToString(reason);
SendMessageProto(proto);
+
+ // Notify swap promises that commit had no updates. In the local compositor
+ // case this goes to the impl thread to be queued up in case we have an
+ // activation pending but that never happens for remote compositor.
+ for (const auto& swap_promise : swap_promises)
+ swap_promise->DidNotSwap(SwapPromise::COMMIT_NO_UPDATE);
}
void RemoteChannelMain::NotifyReadyToCommitOnImpl(
« no previous file with comments | « cc/trees/remote_channel_main.h ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698