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

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

Issue 2639723002: [NOT FOR REVIEW]
Patch Set: . Created 3 years, 11 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/test/layer_tree_settings_for_testing.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 int num_children_that_draw_content = 0; 75 int num_children_that_draw_content = 0;
76 for (size_t i = 0; i < layer->test_properties()->children.size(); ++i) { 76 for (size_t i = 0; i < layer->test_properties()->children.size(); ++i) {
77 num_children_that_draw_content += 77 num_children_that_draw_content +=
78 RecursiveUpdateNumChildren(layer->test_properties()->children[i]); 78 RecursiveUpdateNumChildren(layer->test_properties()->children[i]);
79 } 79 }
80 layer->test_properties()->num_descendants_that_draw_content = 80 layer->test_properties()->num_descendants_that_draw_content =
81 num_children_that_draw_content; 81 num_children_that_draw_content;
82 return num_children_that_draw_content + (layer->DrawsContent() ? 1 : 0); 82 return num_children_that_draw_content + (layer->DrawsContent() ? 1 : 0);
83 } 83 }
84 84
85 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawPropertiesForActiveTree( 85 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawPropertiesForActiveTree() {
86 bool force_skip_verify_visible_rect_calculations) { 86 UpdateNumChildrenAndDrawProperties(active_tree());
87 UpdateNumChildrenAndDrawProperties(
88 active_tree(), force_skip_verify_visible_rect_calculations);
89 } 87 }
90 88
91 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( 89 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties(
92 LayerTreeImpl* layerTree, 90 LayerTreeImpl* layerTree) {
93 bool force_skip_verify_visible_rect_calculations) {
94 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing()); 91 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing());
95 bool update_lcd_text = false; 92 bool update_lcd_text = false;
96 layerTree->BuildLayerListAndPropertyTreesForTesting(); 93 layerTree->BuildLayerListAndPropertyTreesForTesting();
97 layerTree->UpdateDrawProperties(update_lcd_text, 94 layerTree->UpdateDrawProperties(update_lcd_text);
98 force_skip_verify_visible_rect_calculations);
99 } 95 }
100 96
101 AnimationHost* FakeLayerTreeHostImpl::animation_host() const { 97 AnimationHost* FakeLayerTreeHostImpl::animation_host() const {
102 return static_cast<AnimationHost*>(mutator_host()); 98 return static_cast<AnimationHost*>(mutator_host());
103 } 99 }
104 100
105 } // namespace cc 101 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.h ('k') | cc/test/layer_tree_settings_for_testing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698