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_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 | 449 |
450 { | 450 { |
451 TRACE_EVENT2("cc", | 451 TRACE_EVENT2("cc", |
452 "LayerTreeImpl::UpdateDrawProperties", | 452 "LayerTreeImpl::UpdateDrawProperties", |
453 "IsActive", | 453 "IsActive", |
454 IsActiveTree(), | 454 IsActiveTree(), |
455 "SourceFrameNumber", | 455 "SourceFrameNumber", |
456 source_frame_number_); | 456 source_frame_number_); |
457 LayerImpl* page_scale_layer = | 457 LayerImpl* page_scale_layer = |
458 page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer(); | 458 page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer(); |
459 bool can_render_to_separate_surface = !resourceless_software_draw(); | 459 bool can_render_to_separate_surface = |
| 460 (layer_tree_host_impl_->GetDrawMode() != |
| 461 DRAW_MODE_RESOURCELESS_SOFTWARE); |
460 | 462 |
461 ++render_surface_layer_list_id_; | 463 ++render_surface_layer_list_id_; |
462 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( | 464 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( |
463 root_layer(), | 465 root_layer(), |
464 DrawViewportSize(), | 466 DrawViewportSize(), |
465 layer_tree_host_impl_->DrawTransform(), | 467 layer_tree_host_impl_->DrawTransform(), |
466 device_scale_factor(), | 468 device_scale_factor(), |
467 total_page_scale_factor(), | 469 total_page_scale_factor(), |
468 page_scale_layer, | 470 page_scale_layer, |
469 MaxTextureSize(), | 471 MaxTextureSize(), |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 } | 680 } |
679 | 681 |
680 PaintTimeCounter* LayerTreeImpl::paint_time_counter() const { | 682 PaintTimeCounter* LayerTreeImpl::paint_time_counter() const { |
681 return layer_tree_host_impl_->paint_time_counter(); | 683 return layer_tree_host_impl_->paint_time_counter(); |
682 } | 684 } |
683 | 685 |
684 MemoryHistory* LayerTreeImpl::memory_history() const { | 686 MemoryHistory* LayerTreeImpl::memory_history() const { |
685 return layer_tree_host_impl_->memory_history(); | 687 return layer_tree_host_impl_->memory_history(); |
686 } | 688 } |
687 | 689 |
688 bool LayerTreeImpl::resourceless_software_draw() const { | |
689 return layer_tree_host_impl_->GetDrawMode() == | |
690 DRAW_MODE_RESOURCELESS_SOFTWARE; | |
691 } | |
692 | |
693 gfx::Size LayerTreeImpl::device_viewport_size() const { | 690 gfx::Size LayerTreeImpl::device_viewport_size() const { |
694 return layer_tree_host_impl_->device_viewport_size(); | 691 return layer_tree_host_impl_->device_viewport_size(); |
695 } | 692 } |
696 | 693 |
697 bool LayerTreeImpl::IsActiveTree() const { | 694 bool LayerTreeImpl::IsActiveTree() const { |
698 return layer_tree_host_impl_->active_tree() == this; | 695 return layer_tree_host_impl_->active_tree() == this; |
699 } | 696 } |
700 | 697 |
701 bool LayerTreeImpl::IsPendingTree() const { | 698 bool LayerTreeImpl::IsPendingTree() const { |
702 return layer_tree_host_impl_->pending_tree() == this; | 699 return layer_tree_host_impl_->pending_tree() == this; |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 | 1418 |
1422 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 1419 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
1423 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer); | 1420 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer); |
1424 } | 1421 } |
1425 | 1422 |
1426 void LayerTreeImpl::InputScrollAnimationFinished() { | 1423 void LayerTreeImpl::InputScrollAnimationFinished() { |
1427 layer_tree_host_impl_->ScrollEnd(); | 1424 layer_tree_host_impl_->ScrollEnd(); |
1428 } | 1425 } |
1429 | 1426 |
1430 } // namespace cc | 1427 } // namespace cc |
OLD | NEW |