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

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

Issue 1921503005: cc: Move main thread hierarchy dependencies into PropertyTreeBuilder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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/trees/layer_tree_impl.cc ('k') | cc/trees/property_tree_builder.h » ('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/trees/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 // These occlusion tests attach and detach layers in multiple 226 // These occlusion tests attach and detach layers in multiple
227 // iterations, so rebuild property trees every time. 227 // iterations, so rebuild property trees every time.
228 root->layer_tree_impl()->property_trees()->needs_rebuild = true; 228 root->layer_tree_impl()->property_trees()->needs_rebuild = true;
229 229
230 FakeLayerTreeHostImpl::RecursiveUpdateNumChildren(root); 230 FakeLayerTreeHostImpl::RecursiveUpdateNumChildren(root);
231 231
232 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( 232 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
233 root, root->bounds(), &render_surface_layer_list_impl_); 233 root, root->bounds(), &render_surface_layer_list_impl_);
234 inputs.can_adjust_raster_scales = true; 234 inputs.can_adjust_raster_scales = true;
235 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 235 LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs);
236 236
237 layer_iterator_ = layer_iterator_begin_ = 237 layer_iterator_ = layer_iterator_begin_ =
238 LayerIterator::Begin(&render_surface_layer_list_impl_); 238 LayerIterator::Begin(&render_surface_layer_list_impl_);
239 } 239 }
240 240
241 void EnterLayer(LayerImpl* layer, OcclusionTracker* occlusion) { 241 void EnterLayer(LayerImpl* layer, OcclusionTracker* occlusion) {
242 ASSERT_EQ(*layer_iterator_, layer); 242 ASSERT_EQ(*layer_iterator_, layer);
243 ASSERT_TRUE(layer_iterator_.represents_itself()); 243 ASSERT_TRUE(layer_iterator_.represents_itself());
244 occlusion->EnterLayer(layer_iterator_); 244 occlusion->EnterLayer(layer_iterator_);
245 } 245 }
(...skipping 2268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 EXPECT_EQ(gfx::Rect(), 2514 EXPECT_EQ(gfx::Rect(),
2515 occlusion.UnoccludedSurfaceContentRect( 2515 occlusion.UnoccludedSurfaceContentRect(
2516 surface, gfx::Rect(80, 70, 50, 50))); 2516 surface, gfx::Rect(80, 70, 50, 50)));
2517 } 2517 }
2518 }; 2518 };
2519 2519
2520 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 2520 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
2521 2521
2522 } // namespace 2522 } // namespace
2523 } // namespace cc 2523 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/property_tree_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698