OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 } | 383 } |
384 | 384 |
385 void LayerTreeHost::CommitComplete() { | 385 void LayerTreeHost::CommitComplete() { |
386 client_->DidCommit(); | 386 client_->DidCommit(); |
387 } | 387 } |
388 | 388 |
389 scoped_ptr<OutputSurface> LayerTreeHost::CreateOutputSurface() { | 389 scoped_ptr<OutputSurface> LayerTreeHost::CreateOutputSurface() { |
390 return client_->CreateOutputSurface(); | 390 return client_->CreateOutputSurface(); |
391 } | 391 } |
392 | 392 |
393 scoped_ptr<InputHandlerClient> LayerTreeHost::CreateInputHandlerClient() { | |
394 return client_->CreateInputHandlerClient(); | |
395 } | |
396 | |
397 scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl( | 393 scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl( |
398 LayerTreeHostImplClient* client) { | 394 LayerTreeHostImplClient* client) { |
399 DCHECK(proxy_->IsImplThread()); | 395 DCHECK(proxy_->IsImplThread()); |
400 scoped_ptr<LayerTreeHostImpl> host_impl = | 396 scoped_ptr<LayerTreeHostImpl> host_impl = |
401 LayerTreeHostImpl::Create(settings_, | 397 LayerTreeHostImpl::Create(settings_, |
402 client, | 398 client, |
403 proxy_.get(), | 399 proxy_.get(), |
404 rendering_stats_instrumentation_.get()); | 400 rendering_stats_instrumentation_.get()); |
405 if (settings_.calculate_top_controls_position && | 401 if (settings_.calculate_top_controls_position && |
406 host_impl->top_controls_manager()) { | 402 host_impl->top_controls_manager()) { |
407 top_controls_manager_weak_ptr_ = | 403 top_controls_manager_weak_ptr_ = |
408 host_impl->top_controls_manager()->AsWeakPtr(); | 404 host_impl->top_controls_manager()->AsWeakPtr(); |
409 } | 405 } |
| 406 input_handler_weak_ptr_ = host_impl->AsWeakPtr(); |
410 return host_impl.Pass(); | 407 return host_impl.Pass(); |
411 } | 408 } |
412 | 409 |
413 void LayerTreeHost::DidLoseOutputSurface() { | 410 void LayerTreeHost::DidLoseOutputSurface() { |
414 TRACE_EVENT0("cc", "LayerTreeHost::DidLoseOutputSurface"); | 411 TRACE_EVENT0("cc", "LayerTreeHost::DidLoseOutputSurface"); |
415 DCHECK(proxy_->IsMainThread()); | 412 DCHECK(proxy_->IsMainThread()); |
416 | 413 |
417 if (output_surface_lost_) | 414 if (output_surface_lost_) |
418 return; | 415 return; |
419 | 416 |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 bool start_ready_animations = true; | 1017 bool start_ready_animations = true; |
1021 (*iter).second->UpdateState(start_ready_animations, NULL); | 1018 (*iter).second->UpdateState(start_ready_animations, NULL); |
1022 } | 1019 } |
1023 } | 1020 } |
1024 | 1021 |
1025 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1022 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
1026 return proxy_->CapturePicture(); | 1023 return proxy_->CapturePicture(); |
1027 } | 1024 } |
1028 | 1025 |
1029 } // namespace cc | 1026 } // namespace cc |
OLD | NEW |