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

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

Issue 2108883004: Remove LayerTreeImpl::SetRootLayerFromLayerListForTesting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@propertytreestuff
Patch Set: Created 4 years, 5 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_host_common_unittest.cc ('k') | cc/trees/layer_tree_impl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 9626 matching lines...) Expand 10 before | Expand all | Expand 10 after
9637 bool update_lcd_text = false; 9637 bool update_lcd_text = false;
9638 9638
9639 // Set up active and pending tree. 9639 // Set up active and pending tree.
9640 host_impl_->CreatePendingTree(); 9640 host_impl_->CreatePendingTree();
9641 host_impl_->pending_tree()->SetRootLayerForTesting( 9641 host_impl_->pending_tree()->SetRootLayerForTesting(
9642 LayerImpl::Create(host_impl_->pending_tree(), 1)); 9642 LayerImpl::Create(host_impl_->pending_tree(), 1));
9643 host_impl_->pending_tree()->BuildPropertyTreesForTesting(); 9643 host_impl_->pending_tree()->BuildPropertyTreesForTesting();
9644 host_impl_->pending_tree()->UpdateDrawProperties(update_lcd_text); 9644 host_impl_->pending_tree()->UpdateDrawProperties(update_lcd_text);
9645 9645
9646 host_impl_->ActivateSyncTree(); 9646 host_impl_->ActivateSyncTree();
9647 host_impl_->active_tree()->SetRootLayerFromLayerListForTesting();
9648 host_impl_->active_tree()->BuildPropertyTreesForTesting(); 9647 host_impl_->active_tree()->BuildPropertyTreesForTesting();
9649 host_impl_->active_tree()->UpdateDrawProperties(update_lcd_text); 9648 host_impl_->active_tree()->UpdateDrawProperties(update_lcd_text);
9650 9649
9651 host_impl_->CreatePendingTree(); 9650 host_impl_->CreatePendingTree();
9652 host_impl_->pending_tree()->UpdateDrawProperties(update_lcd_text); 9651 host_impl_->pending_tree()->UpdateDrawProperties(update_lcd_text);
9653 host_impl_->active_tree()->UpdateDrawProperties(update_lcd_text); 9652 host_impl_->active_tree()->UpdateDrawProperties(update_lcd_text);
9654 9653
9655 EXPECT_FALSE(host_impl_->pending_tree()->needs_update_draw_properties()); 9654 EXPECT_FALSE(host_impl_->pending_tree()->needs_update_draw_properties());
9656 EXPECT_FALSE(host_impl_->active_tree()->needs_update_draw_properties()); 9655 EXPECT_FALSE(host_impl_->active_tree()->needs_update_draw_properties());
9657 9656
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
10789 10788
10790 TEST_F(LayerTreeHostImplTest, UpdatePageScaleFactorOnActiveTree) { 10789 TEST_F(LayerTreeHostImplTest, UpdatePageScaleFactorOnActiveTree) {
10791 // Check page scale factor update in property trees when an update is made 10790 // Check page scale factor update in property trees when an update is made
10792 // on the active tree. 10791 // on the active tree.
10793 host_impl_->CreatePendingTree(); 10792 host_impl_->CreatePendingTree();
10794 host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 3.f); 10793 host_impl_->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 3.f);
10795 CreateScrollAndContentsLayers(host_impl_->pending_tree(), 10794 CreateScrollAndContentsLayers(host_impl_->pending_tree(),
10796 gfx::Size(100, 100)); 10795 gfx::Size(100, 100));
10797 host_impl_->pending_tree()->BuildPropertyTreesForTesting(); 10796 host_impl_->pending_tree()->BuildPropertyTreesForTesting();
10798 host_impl_->ActivateSyncTree(); 10797 host_impl_->ActivateSyncTree();
10799 host_impl_->active_tree()->SetRootLayerFromLayerListForTesting();
10800 DrawFrame(); 10798 DrawFrame();
10801 10799
10802 host_impl_->CreatePendingTree(); 10800 host_impl_->CreatePendingTree();
10803 host_impl_->active_tree()->SetPageScaleOnActiveTree(2.f); 10801 host_impl_->active_tree()->SetPageScaleOnActiveTree(2.f);
10804 LayerImpl* page_scale_layer = host_impl_->active_tree()->PageScaleLayer(); 10802 LayerImpl* page_scale_layer = host_impl_->active_tree()->PageScaleLayer();
10805 10803
10806 TransformNode* active_tree_node = 10804 TransformNode* active_tree_node =
10807 host_impl_->active_tree()->property_trees()->transform_tree.Node( 10805 host_impl_->active_tree()->property_trees()->transform_tree.Node(
10808 page_scale_layer->transform_tree_index()); 10806 page_scale_layer->transform_tree_index());
10809 // SetPageScaleOnActiveTree also updates the factors in property trees. 10807 // SetPageScaleOnActiveTree also updates the factors in property trees.
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
10951 10949
10952 // Re-initialize with a software output surface. 10950 // Re-initialize with a software output surface.
10953 output_surface_ = FakeOutputSurface::CreateSoftware( 10951 output_surface_ = FakeOutputSurface::CreateSoftware(
10954 base::WrapUnique(new SoftwareOutputDevice)); 10952 base::WrapUnique(new SoftwareOutputDevice));
10955 host_impl_->InitializeRenderer(output_surface_.get()); 10953 host_impl_->InitializeRenderer(output_surface_.get());
10956 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); 10954 EXPECT_FALSE(host_impl_->use_gpu_rasterization());
10957 } 10955 }
10958 10956
10959 } // namespace 10957 } // namespace
10960 } // namespace cc 10958 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698