Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 924143005: cc: Stop passing the occlusion explicitly to UpdateTiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: passocclusion: perftests Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 occlusion_tracker.ComputeVisibleRegionInScreen(); 647 occlusion_tracker.ComputeVisibleRegionInScreen();
648 } 648 }
649 649
650 { 650 {
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;
658 size_t layers_updated_count = 0; 657 size_t layers_updated_count = 0;
659 bool tile_priorities_updated = false; 658 bool tile_priorities_updated = false;
660 for (PictureLayerImpl* layer : picture_layers_) { 659 for (PictureLayerImpl* layer : picture_layers_) {
661 // TODO(danakj): Remove this to fix crbug.com/446751 660 // 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 tile_priorities_updated |= layer->UpdateTiles(resourceless_software_draw);
666 settings().use_occlusion_for_tile_prioritization
667 ? layer->draw_properties().occlusion_in_content_space
668 : kEmptyOcclusion;
669 tile_priorities_updated |=
670 layer->UpdateTiles(occlusion, resourceless_software_draw);
671 } 665 }
672 666
673 if (tile_priorities_updated) 667 if (tile_priorities_updated)
674 DidModifyTilePriorities(); 668 DidModifyTilePriorities();
675 669
676 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateTilePriorities", 670 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateTilePriorities",
677 "layers_updated_count", layers_updated_count); 671 "layers_updated_count", layers_updated_count);
678 } 672 }
679 673
680 DCHECK(!needs_update_draw_properties_) << 674 DCHECK(!needs_update_draw_properties_) <<
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 scoped_ptr<PendingPageScaleAnimation> pending_animation) { 1622 scoped_ptr<PendingPageScaleAnimation> pending_animation) {
1629 pending_page_scale_animation_ = pending_animation.Pass(); 1623 pending_page_scale_animation_ = pending_animation.Pass();
1630 } 1624 }
1631 1625
1632 scoped_ptr<PendingPageScaleAnimation> 1626 scoped_ptr<PendingPageScaleAnimation>
1633 LayerTreeImpl::TakePendingPageScaleAnimation() { 1627 LayerTreeImpl::TakePendingPageScaleAnimation() {
1634 return pending_page_scale_animation_.Pass(); 1628 return pending_page_scale_animation_.Pass();
1635 } 1629 }
1636 1630
1637 } // namespace cc 1631 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698