| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/test/fake_layer_tree_host_impl.h" | 5 #include "cc/test/fake_layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "cc/animation/animation_host.h" | 9 #include "cc/animation/animation_host.h" |
| 10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 int num_children_that_draw_content = 0; | 93 int num_children_that_draw_content = 0; |
| 94 for (size_t i = 0; i < layer->test_properties()->children.size(); ++i) { | 94 for (size_t i = 0; i < layer->test_properties()->children.size(); ++i) { |
| 95 num_children_that_draw_content += | 95 num_children_that_draw_content += |
| 96 RecursiveUpdateNumChildren(layer->test_properties()->children[i]); | 96 RecursiveUpdateNumChildren(layer->test_properties()->children[i]); |
| 97 } | 97 } |
| 98 layer->test_properties()->num_descendants_that_draw_content = | 98 layer->test_properties()->num_descendants_that_draw_content = |
| 99 num_children_that_draw_content; | 99 num_children_that_draw_content; |
| 100 return num_children_that_draw_content + (layer->DrawsContent() ? 1 : 0); | 100 return num_children_that_draw_content + (layer->DrawsContent() ? 1 : 0); |
| 101 } | 101 } |
| 102 | 102 |
| 103 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawPropertiesForActiveTree() { | 103 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawPropertiesForActiveTree( |
| 104 UpdateNumChildrenAndDrawProperties(active_tree()); | 104 bool force_skip_verify_visible_rect_calculations) { |
| 105 UpdateNumChildrenAndDrawProperties( |
| 106 active_tree(), force_skip_verify_visible_rect_calculations); |
| 105 } | 107 } |
| 106 | 108 |
| 107 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( | 109 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( |
| 108 LayerTreeImpl* layerTree) { | 110 LayerTreeImpl* layerTree, |
| 111 bool force_skip_verify_visible_rect_calculations) { |
| 109 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing()); | 112 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing()); |
| 110 bool update_lcd_text = false; | 113 bool update_lcd_text = false; |
| 111 layerTree->BuildLayerListAndPropertyTreesForTesting(); | 114 layerTree->BuildLayerListAndPropertyTreesForTesting(); |
| 112 layerTree->UpdateDrawProperties(update_lcd_text); | 115 layerTree->UpdateDrawProperties(update_lcd_text, |
| 116 force_skip_verify_visible_rect_calculations); |
| 113 } | 117 } |
| 114 | 118 |
| 115 } // namespace cc | 119 } // namespace cc |
| OLD | NEW |