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

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

Issue 1231453002: Compute if a layer is clipped outside CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DrawProperties is_clipped removed Created 5 years, 5 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
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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateTilePriorities", 744 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateTilePriorities",
745 "layers_updated_count", layers_updated_count); 745 "layers_updated_count", layers_updated_count);
746 } 746 }
747 747
748 DCHECK(!needs_update_draw_properties_) << 748 DCHECK(!needs_update_draw_properties_) <<
749 "CalcDrawProperties should not set_needs_update_draw_properties()"; 749 "CalcDrawProperties should not set_needs_update_draw_properties()";
750 return true; 750 return true;
751 } 751 }
752 752
753 void LayerTreeImpl::BuildPropertyTreesForTesting() { 753 void LayerTreeImpl::BuildPropertyTreesForTesting() {
754 LayerTreeHostCommon::PreCalculateMetaInformationForTesting(root_layer_.get());
754 PropertyTreeBuilder::BuildPropertyTrees( 755 PropertyTreeBuilder::BuildPropertyTrees(
755 root_layer_.get(), page_scale_layer_, inner_viewport_scroll_layer_, 756 root_layer_.get(), page_scale_layer_, inner_viewport_scroll_layer_,
756 outer_viewport_scroll_layer_, current_page_scale_factor(), 757 outer_viewport_scroll_layer_, current_page_scale_factor(),
757 device_scale_factor(), gfx::Rect(DrawViewportSize()), 758 device_scale_factor(), gfx::Rect(DrawViewportSize()),
758 layer_tree_host_impl_->DrawTransform(), &property_trees_); 759 layer_tree_host_impl_->DrawTransform(), &property_trees_);
759 } 760 }
760 761
761 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const { 762 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const {
762 // If this assert triggers, then the list is dirty. 763 // If this assert triggers, then the list is dirty.
763 DCHECK(!needs_update_draw_properties_); 764 DCHECK(!needs_update_draw_properties_);
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 const gfx::BoxF& box, 1748 const gfx::BoxF& box,
1748 gfx::BoxF* bounds) const { 1749 gfx::BoxF* bounds) const {
1749 *bounds = gfx::BoxF(); 1750 *bounds = gfx::BoxF();
1750 return layer_tree_host_impl_->animation_host() 1751 return layer_tree_host_impl_->animation_host()
1751 ? layer_tree_host_impl_->animation_host() 1752 ? layer_tree_host_impl_->animation_host()
1752 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) 1753 ->TransformAnimationBoundsForBox(layer->id(), box, bounds)
1753 : true; 1754 : true;
1754 } 1755 }
1755 1756
1756 } // namespace cc 1757 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698