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

Unified Diff: cc/test/layer_tree_test.cc

Issue 85693007: cc: Defer first OutputSurface creation until client is ready (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test.cc
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 64c3e9a3a1a8cc2de59955f98b77b7866ea33dd0..95758c2af1ece29752c516d19eaec11b7f0132e9 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -293,12 +293,10 @@ class LayerTreeHostForTesting : public LayerTreeHost {
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
scoped_ptr<LayerTreeHostForTesting> layer_tree_host(
new LayerTreeHostForTesting(test_hooks, client, settings));
- bool success;
if (impl_task_runner.get())
- success = layer_tree_host->InitializeThreaded(impl_task_runner);
+ layer_tree_host->InitializeThreaded(impl_task_runner);
else
- success = layer_tree_host->InitializeSingleThreaded(client);
- EXPECT_TRUE(success);
+ layer_tree_host->InitializeSingleThreaded(client);
return layer_tree_host.Pass();
}
@@ -463,6 +461,10 @@ void LayerTreeTest::PostSetNextCommitForcesRedrawToMainThread() {
main_thread_weak_ptr_));
}
+void LayerTreeTest::WillBeginTest() {
+ layer_tree_host_->SetLayerTreeHostClientReady();
+}
+
void LayerTreeTest::DoBeginTest() {
client_ = LayerTreeHostClientForTesting::Create(this);
@@ -477,7 +479,7 @@ void LayerTreeTest::DoBeginTest() {
started_ = true;
beginning_ = true;
SetupTree();
- layer_tree_host_->SetLayerTreeHostClientReady();
+ WillBeginTest();
BeginTest();
beginning_ = false;
if (end_when_begin_returns_)
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698