| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 TRACE_EVENT_BEGIN2("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles", | 651 TRACE_EVENT_BEGIN2("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles", |
| 652 "IsActive", IsActiveTree(), "SourceFrameNumber", | 652 "IsActive", IsActiveTree(), "SourceFrameNumber", |
| 653 source_frame_number_); | 653 source_frame_number_); |
| 654 const bool resourceless_software_draw = | 654 const bool resourceless_software_draw = |
| 655 (layer_tree_host_impl_->GetDrawMode() == | 655 (layer_tree_host_impl_->GetDrawMode() == |
| 656 DRAW_MODE_RESOURCELESS_SOFTWARE); | 656 DRAW_MODE_RESOURCELESS_SOFTWARE); |
| 657 static const Occlusion kEmptyOcclusion; | 657 static const Occlusion kEmptyOcclusion; |
| 658 size_t layers_updated_count = 0; | 658 size_t layers_updated_count = 0; |
| 659 bool tile_priorities_updated = false; | 659 bool tile_priorities_updated = false; |
| 660 for (PictureLayerImpl* layer : picture_layers_) { | 660 for (PictureLayerImpl* layer : picture_layers_) { |
| 661 // TODO(danakj): Remove this to fix crbug.com/446751 | |
| 662 if (!layer->IsDrawnRenderSurfaceLayerListMember()) | 661 if (!layer->IsDrawnRenderSurfaceLayerListMember()) |
| 663 continue; | 662 continue; |
| 664 ++layers_updated_count; | 663 ++layers_updated_count; |
| 665 const Occlusion& occlusion = | 664 const Occlusion& occlusion = |
| 666 settings().use_occlusion_for_tile_prioritization | 665 settings().use_occlusion_for_tile_prioritization |
| 667 ? layer->draw_properties().occlusion_in_content_space | 666 ? layer->draw_properties().occlusion_in_content_space |
| 668 : kEmptyOcclusion; | 667 : kEmptyOcclusion; |
| 669 tile_priorities_updated |= | 668 tile_priorities_updated |= |
| 670 layer->UpdateTiles(occlusion, resourceless_software_draw); | 669 layer->UpdateTiles(occlusion, resourceless_software_draw); |
| 671 } | 670 } |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 scoped_ptr<PendingPageScaleAnimation> pending_animation) { | 1627 scoped_ptr<PendingPageScaleAnimation> pending_animation) { |
| 1629 pending_page_scale_animation_ = pending_animation.Pass(); | 1628 pending_page_scale_animation_ = pending_animation.Pass(); |
| 1630 } | 1629 } |
| 1631 | 1630 |
| 1632 scoped_ptr<PendingPageScaleAnimation> | 1631 scoped_ptr<PendingPageScaleAnimation> |
| 1633 LayerTreeImpl::TakePendingPageScaleAnimation() { | 1632 LayerTreeImpl::TakePendingPageScaleAnimation() { |
| 1634 return pending_page_scale_animation_.Pass(); | 1633 return pending_page_scale_animation_.Pass(); |
| 1635 } | 1634 } |
| 1636 | 1635 |
| 1637 } // namespace cc | 1636 } // namespace cc |
| OLD | NEW |