Chromium Code Reviews| 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 452 | 452 |
| 453 { | 453 { |
| 454 TRACE_EVENT2("cc", | 454 TRACE_EVENT2("cc", |
| 455 "LayerTreeImpl::UpdateDrawProperties", | 455 "LayerTreeImpl::UpdateDrawProperties", |
| 456 "IsActive", | 456 "IsActive", |
| 457 IsActiveTree(), | 457 IsActiveTree(), |
| 458 "SourceFrameNumber", | 458 "SourceFrameNumber", |
| 459 source_frame_number_); | 459 source_frame_number_); |
| 460 LayerImpl* page_scale_layer = | 460 LayerImpl* page_scale_layer = |
| 461 page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer(); | 461 page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer(); |
| 462 bool can_render_to_separate_surface = | 462 bool can_render_to_separate_surface = !resourceless_software_draw(); |
| 463 !output_surface()->ForcedDrawToSoftwareDevice(); | |
| 464 | 463 |
| 465 ++render_surface_layer_list_id_; | 464 ++render_surface_layer_list_id_; |
| 466 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( | 465 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( |
| 467 root_layer(), | 466 root_layer(), |
| 468 DrawViewportSize(), | 467 DrawViewportSize(), |
| 469 layer_tree_host_impl_->DrawTransform(), | 468 layer_tree_host_impl_->DrawTransform(), |
| 470 device_scale_factor(), | 469 device_scale_factor(), |
| 471 total_page_scale_factor(), | 470 total_page_scale_factor(), |
| 472 page_scale_layer, | 471 page_scale_layer, |
| 473 MaxTextureSize(), | 472 MaxTextureSize(), |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 673 } | 672 } |
| 674 | 673 |
| 675 PaintTimeCounter* LayerTreeImpl::paint_time_counter() const { | 674 PaintTimeCounter* LayerTreeImpl::paint_time_counter() const { |
| 676 return layer_tree_host_impl_->paint_time_counter(); | 675 return layer_tree_host_impl_->paint_time_counter(); |
| 677 } | 676 } |
| 678 | 677 |
| 679 MemoryHistory* LayerTreeImpl::memory_history() const { | 678 MemoryHistory* LayerTreeImpl::memory_history() const { |
| 680 return layer_tree_host_impl_->memory_history(); | 679 return layer_tree_host_impl_->memory_history(); |
| 681 } | 680 } |
| 682 | 681 |
| 683 bool LayerTreeImpl::device_viewport_valid_for_tile_management() const { | 682 bool LayerTreeImpl::resourceless_software_draw() const { |
|
danakj
2014/07/10 18:33:59
can we get rid of this method, is it used elsewher
boliu
2014/07/10 18:40:36
This is used by PictureLayerImpl, which doesn't ne
| |
| 684 return layer_tree_host_impl_->device_viewport_valid_for_tile_management(); | 683 return layer_tree_host_impl_->GetDrawMode() == |
| 684 DRAW_MODE_RESOURCELESS_SOFTWARE; | |
| 685 } | 685 } |
| 686 | 686 |
| 687 gfx::Size LayerTreeImpl::device_viewport_size() const { | 687 gfx::Size LayerTreeImpl::device_viewport_size() const { |
| 688 return layer_tree_host_impl_->device_viewport_size(); | 688 return layer_tree_host_impl_->device_viewport_size(); |
| 689 } | 689 } |
| 690 | 690 |
| 691 bool LayerTreeImpl::IsActiveTree() const { | 691 bool LayerTreeImpl::IsActiveTree() const { |
| 692 return layer_tree_host_impl_->active_tree() == this; | 692 return layer_tree_host_impl_->active_tree() == this; |
| 693 } | 693 } |
| 694 | 694 |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1367 | 1367 |
| 1368 void LayerTreeImpl::RegisterPictureLayerImpl(PictureLayerImpl* layer) { | 1368 void LayerTreeImpl::RegisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 1369 layer_tree_host_impl_->RegisterPictureLayerImpl(layer); | 1369 layer_tree_host_impl_->RegisterPictureLayerImpl(layer); |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 1372 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 1373 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer); | 1373 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer); |
| 1374 } | 1374 } |
| 1375 | 1375 |
| 1376 } // namespace cc | 1376 } // namespace cc |
| OLD | NEW |