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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2106273002: cc: Change how/when we build layer list/property tress in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: propertytreestuff: . Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index fbcec34abcc8dae2aa9d95f488dff0b2888b53ad..fbc500427a911a5d3b0f5090ad27d5b39015ba0f 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -7172,12 +7172,11 @@ TEST_F(LayerTreeHostCommonTest, ScrollCompensationWithRounding) {
scroller->test_properties()->AddChild(std::move(fixed));
container->test_properties()->AddChild(std::move(scroller));
root->test_properties()->AddChild(std::move(container));
+ root->layer_tree_impl()->SetRootLayerForTesting(std::move(root_ptr));
+ root->layer_tree_impl()->BuildPropertyTreesForTesting();
// Rounded to integers already.
{
- root->layer_tree_impl()->SetRootLayerForTesting(std::move(root_ptr));
- root->layer_tree_impl()->BuildLayerListAndPropertyTreesForTesting();
-
gfx::Vector2dF scroll_delta(3.0, 5.0);
SetScrollOffsetDelta(scroll_layer, scroll_delta);
@@ -7202,8 +7201,6 @@ TEST_F(LayerTreeHostCommonTest, ScrollCompensationWithRounding) {
// Scroll delta requiring rounding.
{
- root->layer_tree_impl()->BuildLayerListAndPropertyTreesForTesting();
-
gfx::Vector2dF scroll_delta(4.1f, 8.1f);
SetScrollOffsetDelta(scroll_layer, scroll_delta);
@@ -7231,8 +7228,8 @@ TEST_F(LayerTreeHostCommonTest, ScrollCompensationWithRounding) {
gfx::Transform scaled_container_transform = container_transform;
scaled_container_transform.Scale3d(2.0, 2.0, 1.0);
container_layer->SetTransform(scaled_container_transform);
+
root->layer_tree_impl()->property_trees()->needs_rebuild = true;
- root->layer_tree_impl()->BuildLayerListAndPropertyTreesForTesting();
gfx::Vector2dF scroll_delta(4.5f, 8.5f);
SetScrollOffsetDelta(scroll_layer, scroll_delta);
@@ -8175,6 +8172,8 @@ TEST_F(LayerTreeHostCommonTest, BoundsDeltaAffectVisibleContentRect) {
false);
sublayer->SetDrawsContent(true);
+ host_impl.active_tree()->BuildPropertyTreesForTesting();
+
LayerImplList layer_impl_list;
LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
root, device_viewport_size, &layer_impl_list);
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698