summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_impl_unittest.cc
diff options
context:
space:
mode:
authorvollick <vollick@chromium.org>2016-03-01 15:37:04 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-01 23:38:40 +0000
commit1bd5b8399b04cae273eeb670dc07091f72ea28c4 (patch)
treefd09a6a24a6bcce232a6d4eeb52208c25d741293 /cc/trees/layer_tree_host_impl_unittest.cc
parent964dcffcac8d9e599a5f66fd977c309bf03007d7 (diff)
downloadchromium_src-1bd5b8399b04cae273eeb670dc07091f72ea28c4.zip
chromium_src-1bd5b8399b04cae273eeb670dc07091f72ea28c4.tar.gz
chromium_src-1bd5b8399b04cae273eeb670dc07091f72ea28c4.tar.bz2
Revert of Use LTHI's *_list() accessors whenever possible (patchset #1 id:1 of https://codereview.chromium.org/1748813003/ )
Reason for revert: I'm going to try another, less code-churny, approach to the layer list conversion. Original issue's description: > Use LTHI's *_list() accessors whenever possible > > This is a mechanical patch which replaces instances of > > LTHI->[active|pending|recycle|_tree()->list() > > with > > LTHI->[active|pending|recycle|_list() > > BUG=557194 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/c2a4176b6099eb93c2198778442e54ad1d1ac78e > Cr-Commit-Position: refs/heads/master@{#378429} TBR=tdresser@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=557194 Review URL: https://codereview.chromium.org/1759443002 Cr-Commit-Position: refs/heads/master@{#378603}
Diffstat (limited to 'cc/trees/layer_tree_host_impl_unittest.cc')
-rw-r--r--cc/trees/layer_tree_host_impl_unittest.cc29
1 files changed, 16 insertions, 13 deletions
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index ff4d6f3..25b066c 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -2743,7 +2743,8 @@ class LayerTreeHostImplTestScrollbarOpacity : public LayerTreeHostImplTest {
host_impl_->pending_tree()->BuildPropertyTreesForTesting();
host_impl_->ActivateSyncTree();
- LayerImpl* scrollbar_layer = host_impl_->active_list()->LayerById(400);
+ LayerImpl* scrollbar_layer =
+ host_impl_->active_tree()->list()->LayerById(400);
EffectNode* active_tree_node =
host_impl_->active_tree()->property_trees()->effect_tree.Node(
@@ -7739,12 +7740,12 @@ TEST_F(LayerTreeHostImplTest, ScrollUnknownNotOnAncestorChain) {
int scroll_layer_id = 2;
LayerImpl* scroll_layer =
- host_impl_->active_list()->LayerById(scroll_layer_id);
+ host_impl_->active_tree()->list()->LayerById(scroll_layer_id);
scroll_layer->SetDrawsContent(true);
int page_scale_layer_id = 5;
LayerImpl* page_scale_layer =
- host_impl_->active_list()->LayerById(page_scale_layer_id);
+ host_impl_->active_tree()->list()->LayerById(page_scale_layer_id);
int occluder_layer_id = 6;
scoped_ptr<LayerImpl> occluder_layer =
@@ -7775,7 +7776,7 @@ TEST_F(LayerTreeHostImplTest, ScrollUnknownScrollAncestorMismatch) {
int scroll_layer_id = 2;
LayerImpl* scroll_layer =
- host_impl_->active_list()->LayerById(scroll_layer_id);
+ host_impl_->active_tree()->list()->LayerById(scroll_layer_id);
scroll_layer->SetDrawsContent(true);
int occluder_layer_id = 6;
@@ -7813,11 +7814,11 @@ TEST_F(LayerTreeHostImplTest, NotScrollInvisibleScroller) {
gfx::Size content_size(100, 100);
SetupScrollAndContentsLayers(content_size);
- LayerImpl* root = host_impl_->active_list()->LayerById(1);
+ LayerImpl* root = host_impl_->active_tree()->list()->LayerById(1);
int scroll_layer_id = 2;
LayerImpl* scroll_layer =
- host_impl_->active_list()->LayerById(scroll_layer_id);
+ host_impl_->active_tree()->list()->LayerById(scroll_layer_id);
int child_scroll_layer_id = 7;
scoped_ptr<LayerImpl> child_scroll =
@@ -7847,8 +7848,9 @@ TEST_F(LayerTreeHostImplTest, ScrollInvisibleScrollerWithVisibleDescendent) {
gfx::Size content_size(100, 100);
SetupScrollAndContentsLayers(content_size);
- LayerImpl* root = host_impl_->active_list()->LayerById(1);
- LayerImpl* root_scroll_layer = host_impl_->active_list()->LayerById(2);
+ LayerImpl* root = host_impl_->active_tree()->list()->LayerById(1);
+ LayerImpl* root_scroll_layer =
+ host_impl_->active_tree()->list()->LayerById(2);
scoped_ptr<LayerImpl> invisible_scroll_layer =
CreateScrollableLayer(7, content_size, root);
@@ -7890,11 +7892,11 @@ TEST_F(LayerTreeHostImplTest, ScrollInvisibleScrollerWithVisibleScrollChild) {
gfx::Size content_size(100, 100);
SetupScrollAndContentsLayers(content_size);
- LayerImpl* root = host_impl_->active_list()->LayerById(1);
+ LayerImpl* root = host_impl_->active_tree()->list()->LayerById(1);
int scroll_layer_id = 2;
LayerImpl* scroll_layer =
- host_impl_->active_list()->LayerById(scroll_layer_id);
+ host_impl_->active_tree()->list()->LayerById(scroll_layer_id);
int scroll_child_id = 6;
scoped_ptr<LayerImpl> scroll_child =
@@ -9270,7 +9272,7 @@ TEST_F(LayerTreeHostImplTest, ExternalTransformAffectsSublayerScaleFactor) {
->children()[0]
.get();
content_layer->AddChild(LayerImpl::Create(host_impl_->active_tree(), 100));
- LayerImpl* test_layer = host_impl_->active_list()->LayerById(100);
+ LayerImpl* test_layer = host_impl_->active_tree()->list()->LayerById(100);
test_layer->SetForceRenderSurface(true);
test_layer->SetDrawsContent(true);
test_layer->SetBounds(layer_size);
@@ -10139,7 +10141,7 @@ TEST_F(LayerTreeHostImplTest, SubLayerScaleForNodeInSubtreeOfPageScaleLayer) {
page_scale_layer->AddChild(LayerImpl::Create(host_impl_->active_tree(), 100));
LayerImpl* in_subtree_of_page_scale_layer =
- host_impl_->active_list()->LayerById(100);
+ host_impl_->active_tree()->list()->LayerById(100);
in_subtree_of_page_scale_layer->SetForceRenderSurface(true);
SetNeedsRebuildPropertyTrees();
RebuildPropertyTrees();
@@ -10151,7 +10153,8 @@ TEST_F(LayerTreeHostImplTest, SubLayerScaleForNodeInSubtreeOfPageScaleLayer) {
host_impl_->active_tree()->SetPageScaleOnActiveTree(2.f);
DrawFrame();
- in_subtree_of_page_scale_layer = host_impl_->active_list()->LayerById(100);
+ in_subtree_of_page_scale_layer =
+ host_impl_->active_tree()->list()->LayerById(100);
node = host_impl_->active_tree()->property_trees()->transform_tree.Node(
in_subtree_of_page_scale_layer->transform_tree_index());
EXPECT_EQ(node->data.sublayer_scale, gfx::Vector2dF(2.f, 2.f));