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

Unified Diff: content/renderer/render_widget.cc

Issue 925353002: Make commit for swap promises do not set can_cancel_commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and comment 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 | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index f9a12e1a32f5cc80f706e3e97b03aaa75c3d6366..c5155b405d911cc0d946ea895e6e7997cdc4f3d5 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1440,7 +1440,13 @@ void RenderWidget::QueueMessage(IPC::Message* msg,
if (swap_promise) {
compositor_->QueueSwapPromise(swap_promise.Pass());
- compositor_->SetNeedsCommit();
+ // Request a commit. This might either A) request a commit ahead of time
+ // or B) request a commit which is not needed because there are not
+ // pending updates. If B) then the commit will be skipped and the swap
+ // promises will be broken (see EarlyOut_NoUpdates). To achieve that we
+ // call SetNeedsUpdateLayers instead of SetNeedsCommit so that
+ // can_cancel_commit is not unset.
+ compositor_->SetNeedsUpdateLayers();
}
}
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698