From e96e34372428b9e0f0d76382b02c62c123ee00a5 Mon Sep 17 00:00:00 2001 From: "sievers@google.com" Date: Thu, 19 Dec 2013 18:56:07 +0000 Subject: cc: Defer first OutputSurface creation until client is ready Remove the |first_output_surface| which was not used before the client signals ready. This allows the client to wait before creating a graphics context until the gpu thread and client channel are set up. BUG=270179,329739 R=danakj@chromium.org, jamesr@chromium.org, jochen@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238458 Review URL: https://codereview.chromium.org/85693007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241897 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/test/layer_tree_test.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cc/test/layer_tree_test.cc') diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index 64c3e9a..95758c2 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 impl_task_runner) { scoped_ptr 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_) -- cgit v1.1