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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 337693005: 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 af9c7a68c15e3d49d32f3f3349ee7a454e73619b..56e52ad39f4ea237972e3133fd0788e392ab7d04 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -1770,12 +1770,7 @@ class LayerTreeHostContextTestLoseAfterSendingBeginMainFrame
deferred_ = true;
// Defer commits before the BeginFrame arrives, causing it to be delayed.
- MainThreadTaskRunner()->PostTask(
- FROM_HERE,
- base::Bind(&LayerTreeHostContextTestLoseAfterSendingBeginMainFrame::
- DeferCommitsOnMainThread,
- base::Unretained(this),
- true));
+ PostSetDeferCommitsToMainThread(true);
// Meanwhile, lose the context while we are in defer commits.
ImplThreadTaskRunner()->PostTask(
FROM_HERE,
@@ -1788,16 +1783,7 @@ class LayerTreeHostContextTestLoseAfterSendingBeginMainFrame
LoseContext();
// After losing the context, stop deferring commits.
- MainThreadTaskRunner()->PostTask(
- FROM_HERE,
- base::Bind(&LayerTreeHostContextTestLoseAfterSendingBeginMainFrame::
- DeferCommitsOnMainThread,
- base::Unretained(this),
- false));
- }
-
- void DeferCommitsOnMainThread(bool defer_commits) {
- layer_tree_host()->SetDeferCommits(defer_commits);
+ PostSetDeferCommitsToMainThread(false);
}
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