| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 } | 465 } |
| 466 | 466 |
| 467 void LayerTreeHost::CommitComplete() { | 467 void LayerTreeHost::CommitComplete() { |
| 468 client_->DidCommit(); | 468 client_->DidCommit(); |
| 469 } | 469 } |
| 470 | 470 |
| 471 scoped_ptr<OutputSurface> LayerTreeHost::CreateOutputSurface() { | 471 scoped_ptr<OutputSurface> LayerTreeHost::CreateOutputSurface() { |
| 472 return client_->CreateOutputSurface(); | 472 return client_->CreateOutputSurface(); |
| 473 } | 473 } |
| 474 | 474 |
| 475 scoped_ptr<InputHandlerClient> LayerTreeHost::CreateInputHandlerClient() { | |
| 476 return client_->CreateInputHandlerClient(); | |
| 477 } | |
| 478 | |
| 479 scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl( | 475 scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl( |
| 480 LayerTreeHostImplClient* client) { | 476 LayerTreeHostImplClient* client) { |
| 481 DCHECK(proxy_->IsImplThread()); | 477 DCHECK(proxy_->IsImplThread()); |
| 482 scoped_ptr<LayerTreeHostImpl> host_impl = | 478 scoped_ptr<LayerTreeHostImpl> host_impl = |
| 483 LayerTreeHostImpl::Create(settings_, | 479 LayerTreeHostImpl::Create(settings_, |
| 484 client, | 480 client, |
| 485 proxy_.get(), | 481 proxy_.get(), |
| 486 rendering_stats_instrumentation_.get()); | 482 rendering_stats_instrumentation_.get()); |
| 487 if (settings_.calculate_top_controls_position && | 483 if (settings_.calculate_top_controls_position && |
| 488 host_impl->top_controls_manager()) { | 484 host_impl->top_controls_manager()) { |
| 489 top_controls_manager_weak_ptr_ = | 485 top_controls_manager_weak_ptr_ = |
| 490 host_impl->top_controls_manager()->AsWeakPtr(); | 486 host_impl->top_controls_manager()->AsWeakPtr(); |
| 491 } | 487 } |
| 488 input_handler_weak_ptr_ = host_impl->AsWeakPtr(); |
| 492 return host_impl.Pass(); | 489 return host_impl.Pass(); |
| 493 } | 490 } |
| 494 | 491 |
| 495 void LayerTreeHost::DidLoseOutputSurface() { | 492 void LayerTreeHost::DidLoseOutputSurface() { |
| 496 TRACE_EVENT0("cc", "LayerTreeHost::DidLoseOutputSurface"); | 493 TRACE_EVENT0("cc", "LayerTreeHost::DidLoseOutputSurface"); |
| 497 DCHECK(proxy_->IsMainThread()); | 494 DCHECK(proxy_->IsMainThread()); |
| 498 | 495 |
| 499 if (output_surface_lost_) | 496 if (output_surface_lost_) |
| 500 return; | 497 return; |
| 501 | 498 |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 bool start_ready_animations = true; | 1092 bool start_ready_animations = true; |
| 1096 (*iter).second->UpdateState(start_ready_animations, NULL); | 1093 (*iter).second->UpdateState(start_ready_animations, NULL); |
| 1097 } | 1094 } |
| 1098 } | 1095 } |
| 1099 | 1096 |
| 1100 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1097 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
| 1101 return proxy_->CapturePicture(); | 1098 return proxy_->CapturePicture(); |
| 1102 } | 1099 } |
| 1103 | 1100 |
| 1104 } // namespace cc | 1101 } // namespace cc |
| OLD | NEW |