summaryrefslogtreecommitdiffstats
path: root/cc/test/layer_tree_test.cc
diff options
context:
space:
mode:
authorsievers@google.com <sievers@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 18:56:07 +0000
committersievers@google.com <sievers@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 18:56:07 +0000
commite96e34372428b9e0f0d76382b02c62c123ee00a5 (patch)
tree3022527916900b19e41b0a8e4d21b2e1d75a3999 /cc/test/layer_tree_test.cc
parente7d6293bf36c2e3c23c5789530ccfb4b99332daa (diff)
downloadchromium_src-e96e34372428b9e0f0d76382b02c62c123ee00a5.zip
chromium_src-e96e34372428b9e0f0d76382b02c62c123ee00a5.tar.gz
chromium_src-e96e34372428b9e0f0d76382b02c62c123ee00a5.tar.bz2
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
Diffstat (limited to 'cc/test/layer_tree_test.cc')
-rw-r--r--cc/test/layer_tree_test.cc12
1 files changed, 7 insertions, 5 deletions
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<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_)