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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 870183004: Revert of cc: Control defer_commits logic by Scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 5 years, 11 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/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index a15b60aca4ae60241d78cadd8407825a027bc996..49f7e170632b7b739a01631b79ae53a60856e0f1 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -1776,7 +1776,12 @@
deferred_ = true;
// Defer commits before the BeginFrame arrives, causing it to be delayed.
- PostSetDeferCommitsToMainThread(true);
+ MainThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&LayerTreeHostContextTestLoseAfterSendingBeginMainFrame::
+ DeferCommitsOnMainThread,
+ base::Unretained(this),
+ true));
// Meanwhile, lose the context while we are in defer commits.
ImplThreadTaskRunner()->PostTask(
FROM_HERE,
@@ -1789,7 +1794,16 @@
LoseContext();
// After losing the context, stop deferring commits.
- PostSetDeferCommitsToMainThread(false);
+ MainThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&LayerTreeHostContextTestLoseAfterSendingBeginMainFrame::
+ DeferCommitsOnMainThread,
+ base::Unretained(this),
+ false));
+ }
+
+ void DeferCommitsOnMainThread(bool defer_commits) {
+ layer_tree_host()->SetDeferCommits(defer_commits);
}
void WillBeginMainFrame() override {
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698