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

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

Issue 2448403002: cc: Clean up transform tree (Closed)
Patch Set: PAC Created 4 years, 1 month 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/trees/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | 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_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 if (is_occlusion_immune) { 405 if (is_occlusion_immune) {
406 surface->SetNearestOcclusionImmuneAncestor(surface); 406 surface->SetNearestOcclusionImmuneAncestor(surface);
407 } else if (is_root) { 407 } else if (is_root) {
408 surface->SetNearestOcclusionImmuneAncestor(nullptr); 408 surface->SetNearestOcclusionImmuneAncestor(nullptr);
409 } else { 409 } else {
410 surface->SetNearestOcclusionImmuneAncestor( 410 surface->SetNearestOcclusionImmuneAncestor(
411 surface->render_target()->nearest_occlusion_immune_ancestor()); 411 surface->render_target()->nearest_occlusion_immune_ancestor());
412 } 412 }
413 } 413 }
414 bool layer_should_be_drawn = draw_property_utils::LayerNeedsUpdate( 414 bool layer_should_be_drawn = draw_property_utils::LayerNeedsUpdate(
415 layer, layer_is_drawn, property_trees->transform_tree); 415 layer, layer_is_drawn, property_trees);
416 if (!layer_should_be_drawn) 416 if (!layer_should_be_drawn)
417 continue; 417 continue;
418 418
419 layer->set_is_drawn_render_surface_layer_list_member(true); 419 layer->set_is_drawn_render_surface_layer_list_member(true);
420 scroll_tree->Node(layer->scroll_tree_index())->num_drawn_descendants++; 420 scroll_tree->Node(layer->scroll_tree_index())->num_drawn_descendants++;
421 layer->render_target()->layer_list().push_back(layer); 421 layer->render_target()->layer_list().push_back(layer);
422 422
423 // The layer contributes its drawable content rect to its render target. 423 // The layer contributes its drawable content rect to its render target.
424 layer->render_target()->AccumulateContentRectFromContributingLayer(layer); 424 layer->render_target()->AccumulateContentRectFromContributingLayer(layer);
425 } 425 }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 PropertyTreeBuilder::BuildPropertyTrees( 642 PropertyTreeBuilder::BuildPropertyTrees(
643 inputs->root_layer, inputs->page_scale_layer, 643 inputs->root_layer, inputs->page_scale_layer,
644 inputs->inner_viewport_scroll_layer, inputs->outer_viewport_scroll_layer, 644 inputs->inner_viewport_scroll_layer, inputs->outer_viewport_scroll_layer,
645 overscroll_elasticity_layer, elastic_overscroll, 645 overscroll_elasticity_layer, elastic_overscroll,
646 inputs->page_scale_factor, inputs->device_scale_factor, 646 inputs->page_scale_factor, inputs->device_scale_factor,
647 gfx::Rect(inputs->device_viewport_size), inputs->device_transform, 647 gfx::Rect(inputs->device_viewport_size), inputs->device_transform,
648 property_trees); 648 property_trees);
649 draw_property_utils::UpdatePropertyTrees(property_trees, 649 draw_property_utils::UpdatePropertyTrees(property_trees,
650 can_render_to_separate_surface); 650 can_render_to_separate_surface);
651 draw_property_utils::FindLayersThatNeedUpdates( 651 draw_property_utils::FindLayersThatNeedUpdates(
652 inputs->root_layer->GetLayerTree(), property_trees->transform_tree, 652 inputs->root_layer->GetLayerTree(), property_trees, &update_layer_list);
653 property_trees->effect_tree, &update_layer_list);
654 } 653 }
655 654
656 void LayerTreeHostCommon::CalculateDrawProperties( 655 void LayerTreeHostCommon::CalculateDrawProperties(
657 CalcDrawPropsImplInputs* inputs) { 656 CalcDrawPropsImplInputs* inputs) {
658 CalculateDrawPropertiesInternal(inputs, DONT_BUILD_PROPERTY_TREES); 657 CalculateDrawPropertiesInternal(inputs, DONT_BUILD_PROPERTY_TREES);
659 658
660 if (CdpPerfTracingEnabled()) { 659 if (CdpPerfTracingEnabled()) {
661 LayerTreeImpl* layer_tree_impl = inputs->root_layer->layer_tree_impl(); 660 LayerTreeImpl* layer_tree_impl = inputs->root_layer->layer_tree_impl();
662 if (layer_tree_impl->IsPendingTree() && 661 if (layer_tree_impl->IsPendingTree() &&
663 layer_tree_impl->is_first_frame_after_commit()) { 662 layer_tree_impl->is_first_frame_after_commit()) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 710
712 PropertyTrees* GetPropertyTrees(Layer* layer) { 711 PropertyTrees* GetPropertyTrees(Layer* layer) {
713 return layer->GetLayerTree()->property_trees(); 712 return layer->GetLayerTree()->property_trees();
714 } 713 }
715 714
716 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 715 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
717 return layer->layer_tree_impl()->property_trees(); 716 return layer->layer_tree_impl()->property_trees();
718 } 717 }
719 718
720 } // namespace cc 719 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698