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

Unified Diff: cc/trees/layer_tree_host.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/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 74321976ff3bf7a0f1285ed3966a6646f252e811..0bf71244736cab641726a1b30b5fc66e1c9571a6 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -69,8 +69,7 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded(
DCHECK(impl_task_runner);
scoped_ptr<LayerTreeHost> layer_tree_host(
new LayerTreeHost(client, manager, settings));
- if (!layer_tree_host->InitializeThreaded(impl_task_runner))
- return scoped_ptr<LayerTreeHost>();
+ layer_tree_host->InitializeThreaded(impl_task_runner);
return layer_tree_host.Pass();
}
@@ -81,8 +80,7 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateSingleThreaded(
const LayerTreeSettings& settings) {
scoped_ptr<LayerTreeHost> layer_tree_host(
new LayerTreeHost(client, manager, settings));
- if (!layer_tree_host->InitializeSingleThreaded(single_thread_client))
- return scoped_ptr<LayerTreeHost>();
+ layer_tree_host->InitializeSingleThreaded(single_thread_client);
return layer_tree_host.Pass();
}
@@ -125,31 +123,25 @@ LayerTreeHost::LayerTreeHost(
debug_state_.RecordRenderingStats());
}
-bool LayerTreeHost::InitializeThreaded(
+void LayerTreeHost::InitializeThreaded(
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
- return InitializeProxy(ThreadProxy::Create(this, impl_task_runner));
+ InitializeProxy(ThreadProxy::Create(this, impl_task_runner));
}
-bool LayerTreeHost::InitializeSingleThreaded(
+void LayerTreeHost::InitializeSingleThreaded(
LayerTreeHostSingleThreadClient* single_thread_client) {
- return InitializeProxy(
- SingleThreadProxy::Create(this, single_thread_client));
+ InitializeProxy(SingleThreadProxy::Create(this, single_thread_client));
}
-bool LayerTreeHost::InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing) {
- return InitializeProxy(proxy_for_testing.Pass());
+void LayerTreeHost::InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing) {
+ InitializeProxy(proxy_for_testing.Pass());
}
-bool LayerTreeHost::InitializeProxy(scoped_ptr<Proxy> proxy) {
+void LayerTreeHost::InitializeProxy(scoped_ptr<Proxy> proxy) {
TRACE_EVENT0("cc", "LayerTreeHost::InitializeForReal");
- scoped_ptr<OutputSurface> output_surface(CreateOutputSurface());
- if (!output_surface)
- return false;
-
proxy_ = proxy.Pass();
- proxy_->Start(output_surface.Pass());
- return true;
+ proxy_->Start();
}
LayerTreeHost::~LayerTreeHost() {
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698