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

Side by Side Diff: cc/test/fake_layer_tree_host_impl.cc

Issue 2334003003: cc : Compute visible rects dynamically (1) (Closed)
Patch Set: comment Created 4 years, 3 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/test/fake_layer_tree_host_impl.h ('k') | cc/trees/damage_tracker_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 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
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
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698