diff options
Diffstat (limited to 'cc/trees/single_thread_proxy.cc')
-rw-r--r-- | cc/trees/single_thread_proxy.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc index 85085ab..57f3557 100644 --- a/cc/trees/single_thread_proxy.cc +++ b/cc/trees/single_thread_proxy.cc @@ -44,9 +44,11 @@ SingleThreadProxy::SingleThreadProxy(LayerTreeHost* layer_tree_host, << "Threaded compositing must be enabled to use impl-side painting."; } -void SingleThreadProxy::Start() { +void SingleThreadProxy::Start(scoped_ptr<OutputSurface> first_output_surface) { + DCHECK(first_output_surface); DebugScopedSetImplThread impl(this); layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); + first_output_surface_ = first_output_surface.Pass(); } SingleThreadProxy::~SingleThreadProxy() { @@ -111,8 +113,9 @@ void SingleThreadProxy::CreateAndInitializeOutputSurface() { "cc", "SingleThreadProxy::CreateAndInitializeOutputSurface"); DCHECK(Proxy::IsMainThread()); - scoped_ptr<OutputSurface> output_surface = - layer_tree_host_->CreateOutputSurface(); + scoped_ptr<OutputSurface> output_surface = first_output_surface_.Pass(); + if (!output_surface) + output_surface = layer_tree_host_->CreateOutputSurface(); if (!output_surface) { OnOutputSurfaceInitializeAttempted(false); return; |