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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 2661523003: cc: Merge LayerTree into the LayerTreeHost. (Closed)
Patch Set: auto 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_tiles.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 0d8dec3dbe54b783af337e9d9ae1f45f6fd4c0ac..6706ba89fbf7c5ee41a5aba996458e369ad115b2 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -272,7 +272,7 @@ class LayerTreeHostTestReadyToActivateNonEmpty
root_layer->SetBounds(gfx::Size(1024, 1024));
root_layer->SetIsDrawable(true);
- layer_tree()->SetRootLayer(root_layer);
+ layer_tree_host()->SetRootLayer(root_layer);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer->bounds());
}
@@ -343,7 +343,7 @@ class LayerTreeHostTestReadyToDrawNonEmpty
root_layer->SetBounds(gfx::Size(1024, 1024));
root_layer->SetIsDrawable(true);
- layer_tree()->SetRootLayer(root_layer);
+ layer_tree_host()->SetRootLayer(root_layer);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer->bounds());
}
@@ -382,7 +382,7 @@ class LayerTreeHostTestReadyToDrawVisibility : public LayerTreeHostTest {
client_.set_bounds(root_layer->bounds());
root_layer->SetIsDrawable(true);
- layer_tree()->SetRootLayer(root_layer);
+ layer_tree_host()->SetRootLayer(root_layer);
LayerTreeHostTest::SetupTree();
}
@@ -700,7 +700,7 @@ class LayerTreeHostTestPushPropertiesTo : public LayerTreeHostTest {
void SetupTree() override {
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeHostTest::SetupTree();
}
@@ -722,8 +722,8 @@ class LayerTreeHostTestPushPropertiesTo : public LayerTreeHostTest {
}
void DidCommitAndDrawFrame() override {
- SetBeforeValues(layer_tree()->root_layer());
- VerifyBeforeValues(layer_tree()->root_layer());
+ SetBeforeValues(layer_tree_host()->root_layer());
+ VerifyBeforeValues(layer_tree_host()->root_layer());
++index_;
if (index_ == DONE) {
@@ -731,7 +731,7 @@ class LayerTreeHostTestPushPropertiesTo : public LayerTreeHostTest {
return;
}
- SetAfterValues(layer_tree()->root_layer());
+ SetAfterValues(layer_tree_host()->root_layer());
}
void AfterTest() override {}
@@ -795,7 +795,7 @@ class LayerTreeHostTestPushNodeOwnerToNodeIdMap : public LayerTreeHostTest {
root_ = Layer::Create();
child_ = Layer::Create();
root_->AddChild(child_);
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
LayerTreeHostTest::SetupTree();
}
@@ -927,7 +927,7 @@ class LayerTreeHostTestPushElementIdToNodeIdMap : public LayerTreeHostTest {
child_ = Layer::Create();
child_->SetElementId(kTestElementId);
root_->AddChild(child_);
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
LayerTreeHostTest::SetupTree();
}
@@ -1032,7 +1032,7 @@ class LayerTreeHostTestSurfaceDamage : public LayerTreeHostTest {
child_ = Layer::Create();
grand_child_ = Layer::Create();
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
root_->AddChild(child_);
child_->AddChild(grand_child_);
@@ -1115,7 +1115,7 @@ class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest {
// This is to force the child to create a transform and effect node.
child_->SetForceRenderSurfaceForTesting(true);
root_->AddChild(child_);
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
LayerTreeHostTest::SetupTree();
}
@@ -1136,10 +1136,10 @@ class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest {
case 2:
// We rebuild property trees for this case to test the code path of
// damage status synchronization when property trees are different.
- layer_tree()->property_trees()->needs_rebuild = true;
+ layer_tree_host()->property_trees()->needs_rebuild = true;
break;
default:
- EXPECT_FALSE(layer_tree()->property_trees()->needs_rebuild);
+ EXPECT_FALSE(layer_tree_host()->property_trees()->needs_rebuild);
}
}
@@ -1211,7 +1211,7 @@ class LayerTreeHostTestEffectTreeSync : public LayerTreeHostTest {
protected:
void SetupTree() override {
root_ = Layer::Create();
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
blur_filter_.Append(FilterOperation::CreateBlurFilter(0.5f));
brightness_filter_.Append(FilterOperation::CreateBrightnessFilter(0.25f));
sepia_filter_.Append(FilterOperation::CreateSepiaFilter(0.75f));
@@ -1221,7 +1221,7 @@ class LayerTreeHostTestEffectTreeSync : public LayerTreeHostTest {
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommit() override {
- EffectTree& effect_tree = layer_tree()->property_trees()->effect_tree;
+ EffectTree& effect_tree = layer_tree_host()->property_trees()->effect_tree;
EffectNode* node = effect_tree.Node(root_->effect_tree_index());
switch (layer_tree_host()->SourceFrameNumber()) {
case 1:
@@ -1321,7 +1321,7 @@ class LayerTreeHostTestTransformTreeSync : public LayerTreeHostTest {
protected:
void SetupTree() override {
root_ = Layer::Create();
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
LayerTreeHostTest::SetupTree();
}
@@ -1329,7 +1329,7 @@ class LayerTreeHostTestTransformTreeSync : public LayerTreeHostTest {
void DidCommit() override {
TransformTree& transform_tree =
- layer_tree()->property_trees()->transform_tree;
+ layer_tree_host()->property_trees()->transform_tree;
TransformNode* node = transform_tree.Node(root_->transform_tree_index());
gfx::Transform rotate10;
rotate10.Rotate(10.f);
@@ -1413,7 +1413,7 @@ class LayerTreeHostTestTransformTreeDamageIsUpdated : public LayerTreeHostTest {
root_->AddChild(child_);
child_->AddChild(grand_child_);
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
LayerTreeHostTest::SetupTree();
}
@@ -1481,7 +1481,7 @@ class LayerTreeHostTestSwitchMaskLayer : public LayerTreeHostTest {
mask_layer->SetBounds(gfx::Size(10, 10));
child->SetMaskLayer(mask_layer.get());
root->AddChild(std::move(child));
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeHostTest::SetupTree();
}
@@ -1496,17 +1496,19 @@ class LayerTreeHostTestSwitchMaskLayer : public LayerTreeHostTest {
// Root and mask layer should have the same source frame number as they
// will be in the layer update list but the child is not as it has empty
// bounds.
- EXPECT_EQ(
- mask_layer->paint_properties().source_frame_number,
- layer_tree()->root_layer()->paint_properties().source_frame_number);
+ EXPECT_EQ(mask_layer->paint_properties().source_frame_number,
+ layer_tree_host()
+ ->root_layer()
+ ->paint_properties()
+ .source_frame_number);
EXPECT_NE(mask_layer->paint_properties().source_frame_number,
- layer_tree()
+ layer_tree_host()
->root_layer()
->child_at(0)
->paint_properties()
.source_frame_number);
- layer_tree()->root_layer()->RemoveAllChildren();
- layer_tree()->root_layer()->SetMaskLayer(mask_layer.get());
+ layer_tree_host()->root_layer()->RemoveAllChildren();
+ layer_tree_host()->root_layer()->SetMaskLayer(mask_layer.get());
break;
}
}
@@ -1585,8 +1587,8 @@ class LayerTreeHostTestSetNeedsRedrawRect : public LayerTreeHostTest {
root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(bounds_);
- layer_tree()->SetRootLayer(root_layer_);
- layer_tree()->SetViewportSize(bounds_);
+ layer_tree_host()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetViewportSize(bounds_);
PostSetNeedsCommitToMainThread();
client_.set_bounds(root_layer_->bounds());
}
@@ -1649,8 +1651,8 @@ class LayerTreeHostTestGpuRasterDeviceSizeChanged : public LayerTreeHostTest {
transform.Translate(10000.0, 10000.0);
root_layer_->SetTransform(transform);
root_layer_->SetBounds(bounds_);
- layer_tree()->SetRootLayer(root_layer_);
- layer_tree()->SetViewportSize(bounds_);
+ layer_tree_host()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetViewportSize(bounds_);
PostSetNeedsCommitToMainThread();
client_.set_bounds(root_layer_->bounds());
@@ -1686,7 +1688,7 @@ class LayerTreeHostTestGpuRasterDeviceSizeChanged : public LayerTreeHostTest {
void DidCommitAndDrawFrame() override {
// On the second commit, resize the viewport.
if (num_draws_ == 1) {
- layer_tree()->SetViewportSize(gfx::Size(400, 64));
+ layer_tree_host()->SetViewportSize(gfx::Size(400, 64));
}
if (num_draws_ < 2) {
layer_tree_host()->SetNeedsRedrawRect(invalid_rect_);
@@ -1725,7 +1727,7 @@ class LayerTreeHostTestNoExtraCommitFromInvalidate : public LayerTreeHostTest {
scaled_layer_->SetBounds(gfx::Size(1, 1));
root_layer_->AddChild(scaled_layer_);
- layer_tree()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer_->bounds());
}
@@ -1781,7 +1783,7 @@ class LayerTreeHostTestNoExtraCommitFromScrollbarInvalidate
root_layer_->AddChild(scrollbar_);
- layer_tree()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer_->bounds());
}
@@ -1799,7 +1801,7 @@ class LayerTreeHostTestNoExtraCommitFromScrollbarInvalidate
// Changing the device scale factor causes a commit. It also changes
// the content bounds of |scrollbar_|, which should not generate
// a second commit as a result.
- layer_tree()->SetDeviceScaleFactor(4.f);
+ layer_tree_host()->SetDeviceScaleFactor(4.f);
break;
default:
// No extra commits.
@@ -1833,7 +1835,7 @@ class LayerTreeHostTestDeviceScaleFactorChange : public LayerTreeHostTest {
child_layer_->SetBounds(gfx::Size(10, 10));
root_layer_->AddChild(child_layer_);
- layer_tree()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer_->bounds());
}
@@ -1842,7 +1844,7 @@ class LayerTreeHostTestDeviceScaleFactorChange : public LayerTreeHostTest {
void DidCommit() override {
if (layer_tree_host()->SourceFrameNumber() == 1)
- layer_tree()->SetDeviceScaleFactor(4.f);
+ layer_tree_host()->SetDeviceScaleFactor(4.f);
}
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
@@ -1898,8 +1900,8 @@ class LayerTreeHostTestDeviceColorSpaceChange : public LayerTreeHostTest {
child_layer_->SetBounds(gfx::Size(10, 10));
root_layer_->AddChild(child_layer_);
- layer_tree()->SetRootLayer(root_layer_);
- layer_tree()->SetDeviceColorSpace(space1_);
+ layer_tree_host()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetDeviceColorSpace(space1_);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer_->bounds());
}
@@ -1969,19 +1971,19 @@ class LayerTreeHostTestDeviceColorSpaceChange : public LayerTreeHostTest {
break;
case 2:
EXPECT_FALSE(child_layer_->NeedsDisplayForTesting());
- layer_tree()->SetDeviceColorSpace(space2_);
+ layer_tree_host()->SetDeviceColorSpace(space2_);
EXPECT_TRUE(child_layer_->NeedsDisplayForTesting());
break;
case 3:
// The redundant SetDeviceColorSpace should cause no commit and no
// damage. Force a commit for the test to continue.
- layer_tree()->SetDeviceColorSpace(space2_);
+ layer_tree_host()->SetDeviceColorSpace(space2_);
PostSetNeedsCommitToMainThread();
EXPECT_FALSE(child_layer_->NeedsDisplayForTesting());
break;
case 4:
EXPECT_FALSE(child_layer_->NeedsDisplayForTesting());
- layer_tree()->SetDeviceColorSpace(space1_);
+ layer_tree_host()->SetDeviceColorSpace(space1_);
EXPECT_TRUE(child_layer_->NeedsDisplayForTesting());
break;
case 5:
@@ -2017,8 +2019,8 @@ class LayerTreeHostTestSetNextCommitForcesRedraw : public LayerTreeHostTest {
root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(bounds_);
- layer_tree()->SetRootLayer(root_layer_);
- layer_tree()->SetViewportSize(bounds_);
+ layer_tree_host()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetViewportSize(bounds_);
PostSetNeedsCommitToMainThread();
client_.set_bounds(root_layer_->bounds());
}
@@ -2112,7 +2114,7 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest {
root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(gfx::Size(50, 50));
- layer_tree()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
// The initially transparent layer has a larger child layer, which is
// not initially drawn because of the this (parent) layer.
@@ -2216,7 +2218,7 @@ class LayerTreeHostTestDamageWithScale : public LayerTreeHostTest {
child_layer_->SetContentsOpaque(true);
root_layer_->AddChild(child_layer_);
- layer_tree()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer_->bounds());
}
@@ -2306,17 +2308,17 @@ class LayerTreeHostTestCommit : public LayerTreeHostTest {
LayerTreeHostTestCommit() {}
void BeginTest() override {
- layer_tree()->SetViewportSize(gfx::Size(20, 20));
- layer_tree()->set_background_color(SK_ColorGRAY);
- layer_tree()->SetEventListenerProperties(EventListenerClass::kMouseWheel,
- EventListenerProperties::kPassive);
- layer_tree()->SetEventListenerProperties(
+ layer_tree_host()->SetViewportSize(gfx::Size(20, 20));
+ layer_tree_host()->set_background_color(SK_ColorGRAY);
+ layer_tree_host()->SetEventListenerProperties(
+ EventListenerClass::kMouseWheel, EventListenerProperties::kPassive);
+ layer_tree_host()->SetEventListenerProperties(
EventListenerClass::kTouchStartOrMove,
EventListenerProperties::kBlocking);
- layer_tree()->SetEventListenerProperties(
+ layer_tree_host()->SetEventListenerProperties(
EventListenerClass::kTouchEndOrCancel,
EventListenerProperties::kBlockingAndPassive);
- layer_tree()->SetHaveScrollEventHandlers(true);
+ layer_tree_host()->SetHaveScrollEventHandlers(true);
PostSetNeedsCommitToMainThread();
}
@@ -2353,8 +2355,8 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails
: frame_count_with_pending_tree_(0) {}
void BeginTest() override {
- layer_tree()->SetViewportSize(gfx::Size(20, 20));
- layer_tree()->set_background_color(SK_ColorGRAY);
+ layer_tree_host()->SetViewportSize(gfx::Size(20, 20));
+ layer_tree_host()->set_background_color(SK_ColorGRAY);
PostSetNeedsCommitToMainThread();
}
@@ -2407,8 +2409,8 @@ class LayerTreeHostTestFrameTimeUpdatesAfterDraw : public LayerTreeHostTest {
LayerTreeHostTestFrameTimeUpdatesAfterDraw() : frame_(0) {}
void BeginTest() override {
- layer_tree()->SetViewportSize(gfx::Size(20, 20));
- layer_tree()->set_background_color(SK_ColorGRAY);
+ layer_tree_host()->SetViewportSize(gfx::Size(20, 20));
+ layer_tree_host()->set_background_color(SK_ColorGRAY);
PostSetNeedsCommitToMainThread();
}
@@ -2458,7 +2460,7 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest {
void SetupTree() override {
LayerTreeHostTest::SetupTree();
- Layer* root_layer = layer_tree()->root_layer();
+ Layer* root_layer = layer_tree_host()->root_layer();
scoped_refptr<FakePictureLayer> layer = FakePictureLayer::Create(&client_);
layer->set_always_update_resources(true);
@@ -2471,7 +2473,7 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest {
CreateVirtualViewportLayers(root_layer, scroll_layer_, root_layer->bounds(),
root_layer->bounds(), layer_tree_host());
- layer_tree()->SetPageScaleFactorAndLimits(1.f, 0.5f, 2.f);
+ layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 2.f);
client_.set_bounds(root_layer->bounds());
}
@@ -2484,7 +2486,7 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest {
float) override {
gfx::ScrollOffset offset = scroll_layer_->scroll_offset();
scroll_layer_->SetScrollOffset(ScrollOffsetWithDelta(offset, scroll_delta));
- layer_tree()->SetPageScaleFactorAndLimits(scale, 0.5f, 2.f);
+ layer_tree_host()->SetPageScaleFactorAndLimits(scale, 0.5f, 2.f);
}
void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
@@ -2512,8 +2514,8 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest {
void DidCommitAndDrawFrame() override {
switch (layer_tree_host()->SourceFrameNumber()) {
case 1:
- layer_tree()->StartPageScaleAnimation(gfx::Vector2d(), false, 1.25f,
- base::TimeDelta());
+ layer_tree_host()->StartPageScaleAnimation(gfx::Vector2d(), false,
+ 1.25f, base::TimeDelta());
break;
}
}
@@ -2567,9 +2569,9 @@ class LayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers
root_layer_ = FakePictureLayer::Create(&client_);
child_layer_ = FakePictureLayer::Create(&client_);
- layer_tree()->SetViewportSize(gfx::Size(60, 60));
- layer_tree()->SetDeviceScaleFactor(1.5);
- EXPECT_EQ(gfx::Size(60, 60), layer_tree()->device_viewport_size());
+ layer_tree_host()->SetViewportSize(gfx::Size(60, 60));
+ layer_tree_host()->SetDeviceScaleFactor(1.5);
+ EXPECT_EQ(gfx::Size(60, 60), layer_tree_host()->device_viewport_size());
root_layer_->AddChild(child_layer_);
@@ -2581,7 +2583,7 @@ class LayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers
child_layer_->SetBounds(gfx::Size(10, 10));
client_.set_bounds(gfx::Size(10, 10));
- layer_tree()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
PostSetNeedsCommitToMainThread();
client_.set_bounds(root_layer_->bounds());
@@ -2665,14 +2667,14 @@ class LayerTreeHostTestContinuousInvalidate : public LayerTreeHostTest {
: num_commit_complete_(0), num_draw_layers_(0) {}
void BeginTest() override {
- layer_tree()->SetViewportSize(gfx::Size(10, 10));
- layer_tree()->root_layer()->SetBounds(gfx::Size(10, 10));
+ layer_tree_host()->SetViewportSize(gfx::Size(10, 10));
+ layer_tree_host()->root_layer()->SetBounds(gfx::Size(10, 10));
layer_ = FakePictureLayer::Create(&client_);
layer_->SetBounds(gfx::Size(10, 10));
layer_->SetPosition(gfx::PointF(0.f, 0.f));
layer_->SetIsDrawable(true);
- layer_tree()->root_layer()->AddChild(layer_);
+ layer_tree_host()->root_layer()->AddChild(layer_);
PostSetNeedsCommitToMainThread();
client_.set_bounds(layer_->bounds());
@@ -2848,7 +2850,7 @@ class LayerTreeHostTestLCDChange : public LayerTreeHostTest {
root_layer->SetBounds(gfx::Size(10, 10));
root_layer->SetContentsOpaque(true);
- layer_tree()->SetRootLayer(root_layer);
+ layer_tree_host()->SetRootLayer(root_layer);
// The expectations are based on the assumption that the default
// LCD settings are:
@@ -2867,11 +2869,11 @@ class LayerTreeHostTestLCDChange : public LayerTreeHostTest {
break;
case 2:
// Change layer opacity that should trigger lcd change.
- layer_tree()->root_layer()->SetOpacity(.5f);
+ layer_tree_host()->root_layer()->SetOpacity(.5f);
break;
case 3:
// Change layer opacity that should not trigger lcd change.
- layer_tree()->root_layer()->SetOpacity(1.f);
+ layer_tree_host()->root_layer()->SetOpacity(1.f);
break;
case 4:
EndTest();
@@ -3082,7 +3084,7 @@ class LayerTreeHostTestUninvertibleTransformDoesNotBlockActivation
scoped_refptr<Layer> layer = PictureLayer::Create(&client_);
layer->SetTransform(gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
layer->SetBounds(gfx::Size(10, 10));
- layer_tree()->root_layer()->AddChild(layer);
+ layer_tree_host()->root_layer()->AddChild(layer);
client_.set_bounds(layer->bounds());
}
@@ -3118,7 +3120,7 @@ class LayerTreeHostTestNumFramesPending : public LayerTreeHostTest {
// Round 2 done.
EXPECT_EQ(1, frame_);
layer_tree_host()->SetNeedsRedrawRect(
- gfx::Rect(layer_tree()->device_viewport_size()));
+ gfx::Rect(layer_tree_host()->device_viewport_size()));
break;
}
}
@@ -3170,7 +3172,7 @@ class LayerTreeHostTestResourcelessSoftwareDraw : public LayerTreeHostTest {
root_layer_->AddChild(parent_layer_);
parent_layer_->AddChild(child_layer_);
- layer_tree()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer_->bounds());
@@ -3404,40 +3406,42 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest {
++num_commits_;
// The scrollbar layer always needs to be pushed.
- if (root_->GetLayerTree()) {
- EXPECT_FALSE(root_->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ if (root_->layer_tree_host()) {
+ EXPECT_FALSE(root_->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
root_.get()));
}
- if (child2_->GetLayerTree()) {
- EXPECT_FALSE(child2_->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
- child2_.get()));
+ if (child2_->layer_tree_host()) {
+ EXPECT_FALSE(
+ child2_->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child2_.get()));
}
- if (leaf_always_pushing_layer_->GetLayerTree()) {
- EXPECT_TRUE(leaf_always_pushing_layer_->GetLayerTree()
+ if (leaf_always_pushing_layer_->layer_tree_host()) {
+ EXPECT_TRUE(leaf_always_pushing_layer_->layer_tree_host()
->LayerNeedsPushPropertiesForTesting(
leaf_always_pushing_layer_.get()));
}
// child_ and grandchild_ don't persist their need to push properties.
- if (child_->GetLayerTree()) {
- EXPECT_FALSE(child_->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
- child_.get()));
+ if (child_->layer_tree_host()) {
+ EXPECT_FALSE(
+ child_->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
}
- if (grandchild_->GetLayerTree()) {
+ if (grandchild_->layer_tree_host()) {
EXPECT_FALSE(
- grandchild_->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ grandchild_->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild_.get()));
}
- if (other_root_->GetLayerTree()) {
+ if (other_root_->layer_tree_host()) {
EXPECT_FALSE(
- other_root_->GetLayerTree()->LayerNeedsPushPropertiesForTesting(
+ other_root_->layer_tree_host()->LayerNeedsPushPropertiesForTesting(
other_root_.get()));
}
switch (num_commits_) {
case 1:
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
// Layers added to the tree get committed.
++expected_push_properties_root_;
++expected_push_properties_child_;
@@ -3449,12 +3453,12 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest {
// No layers need commit.
break;
case 3:
- layer_tree()->SetRootLayer(other_root_);
+ layer_tree_host()->SetRootLayer(other_root_);
// Layers added to the tree get committed.
++expected_push_properties_other_root_;
break;
case 4:
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
// Layers added to the tree get committed.
++expected_push_properties_root_;
++expected_push_properties_child_;
@@ -3485,11 +3489,11 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest {
++expected_push_properties_grandchild_;
break;
case 10:
- layer_tree()->SetViewportSize(gfx::Size(20, 20));
+ layer_tree_host()->SetViewportSize(gfx::Size(20, 20));
// No layers need commit.
break;
case 11:
- layer_tree()->SetPageScaleFactorAndLimits(1.f, 0.8f, 1.1f);
+ layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.8f, 1.1f);
// No layers need commit.
break;
case 12:
@@ -3528,7 +3532,7 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest {
}
// The leaf layer always pushes.
- if (leaf_always_pushing_layer_->GetLayerTree())
+ if (leaf_always_pushing_layer_->layer_tree_host())
++expected_push_properties_leaf_layer_;
}
@@ -3764,7 +3768,7 @@ class LayerTreeHostTestPropertyChangesDuringUpdateArePushed
root_->AddChild(scrollbar_layer_);
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
LayerTreeHostTest::SetupTree();
}
@@ -3782,7 +3786,7 @@ class LayerTreeHostTestPropertyChangesDuringUpdateArePushed
scrollbar_layer_->SetBounds(gfx::Size(30, 30));
- EXPECT_TRUE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
scrollbar_layer_.get()));
layer_tree_host()->SetNeedsCommit();
@@ -3814,7 +3818,7 @@ class LayerTreeHostTestSetDrawableCausesCommit : public LayerTreeHostTest {
child_ = PushPropertiesCountingLayer::Create();
root_->AddChild(child_);
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
LayerTreeHostTest::SetupTree();
}
@@ -3828,9 +3832,9 @@ class LayerTreeHostTestSetDrawableCausesCommit : public LayerTreeHostTest {
// is made during this, however, it needs to be pushed in the upcoming
// commit.
EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
EXPECT_EQ(0, root_->NumDescendantsThatDrawContent());
root_->reset_push_properties_count();
child_->reset_push_properties_count();
@@ -3839,19 +3843,20 @@ class LayerTreeHostTestSetDrawableCausesCommit : public LayerTreeHostTest {
EXPECT_EQ(0u, root_->push_properties_count());
EXPECT_EQ(0u, child_->push_properties_count());
EXPECT_TRUE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
EXPECT_TRUE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
break;
}
case 2:
EXPECT_EQ(1u, root_->push_properties_count());
EXPECT_EQ(1u, child_->push_properties_count());
EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
EndTest();
break;
}
@@ -3917,16 +3922,16 @@ class LayerTreeHostTestPushPropertiesAddingToTreeRequiresPush
switch (last_source_frame_number) {
case 0:
// All layers will need push properties as we set their layer tree host
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
EXPECT_TRUE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_TRUE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild1_.get()));
- EXPECT_TRUE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild2_.get()));
- EXPECT_TRUE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild3_.get()));
break;
case 1:
@@ -3945,74 +3950,74 @@ class LayerTreeHostTestPushPropertiesRemovingChildStopsRecursion
int last_source_frame_number = layer_tree_host()->SourceFrameNumber() - 1;
switch (last_source_frame_number) {
case 0:
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
break;
case 1:
EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_FALSE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild1_.get()));
- EXPECT_FALSE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild2_.get()));
- EXPECT_FALSE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild3_.get()));
grandchild1_->RemoveFromParent();
grandchild1_->SetPosition(gfx::PointF(1.f, 1.f));
EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_FALSE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild2_.get()));
- EXPECT_FALSE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild3_.get()));
child_->AddChild(grandchild1_);
EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_TRUE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild1_.get()));
- EXPECT_FALSE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild2_.get()));
- EXPECT_FALSE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild3_.get()));
grandchild2_->SetPosition(gfx::PointF(1.f, 1.f));
EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_TRUE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild1_.get()));
- EXPECT_TRUE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild2_.get()));
- EXPECT_FALSE(layer_tree()->LayerNeedsPushPropertiesForTesting(
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
grandchild3_.get()));
// grandchild2_ will still need a push properties.
grandchild1_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
// grandchild3_ does not need a push properties, so recursing should
// no longer be needed.
grandchild2_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree()->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
EndTest();
break;
}
@@ -4025,42 +4030,41 @@ class LayerTreeHostTestPushPropertiesRemovingChildStopsRecursionWithPersistence
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
void DidCommitAndDrawFrame() override {
- LayerTree* layer_tree = layer_tree_host()->GetLayerTree();
int last_source_frame_number = layer_tree_host()->SourceFrameNumber() - 1;
switch (last_source_frame_number) {
case 0:
- layer_tree->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
grandchild1_->set_persist_needs_push_properties(true);
grandchild2_->set_persist_needs_push_properties(true);
break;
case 1:
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild1_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild2_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild3_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild1_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild2_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild3_.get()));
// grandchild2_ will still need a push properties.
grandchild1_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
// grandchild3_ does not need a push properties, so recursing should
// no longer be needed.
grandchild2_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
EndTest();
break;
}
@@ -4074,23 +4078,22 @@ class LayerTreeHostTestPushPropertiesSetPropertiesWhileOutsideTree
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
void DidCommitAndDrawFrame() override {
- LayerTree* layer_tree = layer_tree_host()->GetLayerTree();
int last_source_frame_number = layer_tree_host()->SourceFrameNumber() - 1;
switch (last_source_frame_number) {
case 0:
- layer_tree->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
break;
case 1:
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild1_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild2_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild3_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild1_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild2_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild3_.get()));
// Change grandchildren while their parent is not in the tree.
child_->RemoveFromParent();
@@ -4099,36 +4102,36 @@ class LayerTreeHostTestPushPropertiesSetPropertiesWhileOutsideTree
root_->AddChild(child_);
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild1_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild2_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild3_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild1_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild2_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild3_.get()));
grandchild1_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
grandchild2_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
grandchild3_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
EndTest();
break;
@@ -4143,57 +4146,56 @@ class LayerTreeHostTestPushPropertiesSetPropertyInParentThenChild
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
void DidCommitAndDrawFrame() override {
- LayerTree* layer_tree = layer_tree_host()->GetLayerTree();
int last_source_frame_number = layer_tree_host()->SourceFrameNumber() - 1;
switch (last_source_frame_number) {
case 0:
- layer_tree->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
break;
case 1:
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild1_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild2_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild3_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild1_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild2_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild3_.get()));
child_->SetPosition(gfx::PointF(1.f, 1.f));
grandchild1_->SetPosition(gfx::PointF(1.f, 1.f));
grandchild2_->SetPosition(gfx::PointF(1.f, 1.f));
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild1_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild2_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild3_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild1_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild2_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild3_.get()));
grandchild1_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
grandchild2_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
child_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
EndTest();
break;
@@ -4208,57 +4210,56 @@ class LayerTreeHostTestPushPropertiesSetPropertyInChildThenParent
: public LayerTreeHostTestCasePushPropertiesThreeGrandChildren {
protected:
void DidCommitAndDrawFrame() override {
- LayerTree* layer_tree = layer_tree_host()->GetLayerTree();
int last_source_frame_number = layer_tree_host()->SourceFrameNumber() - 1;
switch (last_source_frame_number) {
case 0:
- layer_tree->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
break;
case 1:
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild1_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild2_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild3_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild1_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild2_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild3_.get()));
grandchild1_->SetPosition(gfx::PointF(1.f, 1.f));
grandchild2_->SetPosition(gfx::PointF(1.f, 1.f));
child_->SetPosition(gfx::PointF(1.f, 1.f));
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild1_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild2_.get()));
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(grandchild3_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild1_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild2_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ grandchild3_.get()));
grandchild1_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
grandchild2_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
- EXPECT_TRUE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
+ EXPECT_TRUE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_.get()));
child_->RemoveFromParent();
EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(root_.get()));
+ layer_tree_host()->LayerNeedsPushPropertiesForTesting(root_.get()));
EndTest();
break;
@@ -4379,7 +4380,7 @@ class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw {
VideoLayer::Create(&provider_, media::VIDEO_ROTATION_0);
video_layer->SetBounds(gfx::Size(10, 10));
video_layer->SetIsDrawable(true);
- layer_tree()->root_layer()->AddChild(video_layer);
+ layer_tree_host()->root_layer()->AddChild(video_layer);
invalidate_layer_ = video_layer;
}
@@ -4409,19 +4410,18 @@ class LayerTreeHostTestPushHiddenLayer : public LayerTreeHostTest {
child_layer_->SetIsDrawable(true);
parent_layer_->AddChild(child_layer_);
- layer_tree()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
LayerTreeHostTest::SetupTree();
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DidCommitAndDrawFrame() override {
- LayerTree* layer_tree = layer_tree_host()->GetLayerTree();
switch (layer_tree_host()->SourceFrameNumber()) {
case 1:
// The layer type used does not need to push properties every frame.
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_layer_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_layer_.get()));
// Change the bounds of the child layer, but make it skipped
// by CalculateDrawProperties.
@@ -4430,8 +4430,8 @@ class LayerTreeHostTestPushHiddenLayer : public LayerTreeHostTest {
break;
case 2:
// The bounds of the child layer were pushed to the impl side.
- EXPECT_FALSE(
- layer_tree->LayerNeedsPushPropertiesForTesting(child_layer_.get()));
+ EXPECT_FALSE(layer_tree_host()->LayerNeedsPushPropertiesForTesting(
+ child_layer_.get()));
EndTest();
break;
@@ -4463,7 +4463,7 @@ class LayerTreeHostTestUpdateLayerInEmptyViewport : public LayerTreeHostTest {
root_layer_ = FakePictureLayer::Create(&client_);
root_layer_->SetBounds(gfx::Size(10, 10));
- layer_tree()->SetRootLayer(root_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer_->bounds());
}
@@ -4471,7 +4471,7 @@ class LayerTreeHostTestUpdateLayerInEmptyViewport : public LayerTreeHostTest {
void BeginTest() override {
// The viewport is empty, but we still need to update layers on the main
// thread.
- layer_tree()->SetViewportSize(gfx::Size(0, 0));
+ layer_tree_host()->SetViewportSize(gfx::Size(0, 0));
PostSetNeedsCommitToMainThread();
}
@@ -4522,10 +4522,10 @@ class LayerTreeHostTestElasticOverscroll : public LayerTreeHostTest {
content_layer->SetBounds(gfx::Size(10, 10));
inner_viewport_scroll_layer->AddChild(content_layer);
- layer_tree()->SetRootLayer(root_layer_);
- layer_tree()->RegisterViewportLayers(overscroll_elasticity_layer,
- page_scale_layer,
- inner_viewport_scroll_layer, nullptr);
+ layer_tree_host()->SetRootLayer(root_layer_);
+ layer_tree_host()->RegisterViewportLayers(
+ overscroll_elasticity_layer, page_scale_layer,
+ inner_viewport_scroll_layer, nullptr);
LayerTreeHostTest::SetupTree();
client_.set_bounds(content_layer->bounds());
}
@@ -4796,9 +4796,9 @@ class LayerTreeHostTestKeepSwapPromise : public LayerTreeHostTest {
layer_ = SolidColorLayer::Create();
layer_->SetIsDrawable(true);
layer_->SetBounds(gfx::Size(10, 10));
- layer_tree()->SetRootLayer(layer_);
+ layer_tree_host()->SetRootLayer(layer_);
gfx::Size bounds(100, 100);
- layer_tree()->SetViewportSize(bounds);
+ layer_tree_host()->SetViewportSize(bounds);
PostSetNeedsCommitToMainThread();
}
@@ -4891,9 +4891,9 @@ class LayerTreeHostTestKeepSwapPromiseMFBA : public LayerTreeHostTest {
layer_ = SolidColorLayer::Create();
layer_->SetIsDrawable(true);
layer_->SetBounds(gfx::Size(10, 10));
- layer_tree()->SetRootLayer(layer_);
+ layer_tree_host()->SetRootLayer(layer_);
gfx::Size bounds(100, 100);
- layer_tree()->SetViewportSize(bounds);
+ layer_tree_host()->SetViewportSize(bounds);
PostSetNeedsCommitToMainThread();
}
@@ -5125,7 +5125,7 @@ class LayerTreeHostTestHighResRequiredAfterEvictingUIResources
LayerTreeHostTest::SetupTree();
ui_resource_ =
FakeScopedUIResource::Create(layer_tree_host()->GetUIResourceManager());
- client_.set_bounds(layer_tree()->root_layer()->bounds());
+ client_.set_bounds(layer_tree_host()->root_layer()->bounds());
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
@@ -5181,7 +5181,7 @@ class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest {
layer_ = layer.get();
layer->SetBounds(gfx::Size(10, 10));
layer->SetIsDrawable(true);
- layer_tree()->root_layer()->AddChild(layer);
+ layer_tree_host()->root_layer()->AddChild(layer);
layer_client_.set_bounds(layer_->bounds());
}
@@ -5235,7 +5235,7 @@ class LayerTreeHostTestEmptyLayerGpuRasterization : public LayerTreeHostTest {
layer_ = layer.get();
layer->SetBounds(gfx::Size());
layer->SetIsDrawable(true);
- layer_tree()->root_layer()->AddChild(layer);
+ layer_tree_host()->root_layer()->AddChild(layer);
layer_client_.set_bounds(layer->bounds());
}
@@ -5291,7 +5291,7 @@ class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest {
layer_ = layer.get();
layer->SetBounds(gfx::Size(10, 10));
layer->SetIsDrawable(true);
- layer_tree()->root_layer()->AddChild(layer);
+ layer_tree_host()->root_layer()->AddChild(layer);
layer_client_.set_bounds(layer_->bounds());
}
@@ -5359,7 +5359,7 @@ class LayerTreeHostTestGpuRasterizationReenabled : public LayerTreeHostTest {
layer_ = layer.get();
layer->SetBounds(gfx::Size(10, 10));
layer->SetIsDrawable(true);
- layer_tree()->root_layer()->AddChild(layer);
+ layer_tree_host()->root_layer()->AddChild(layer);
layer_client_.set_bounds(layer_->bounds());
}
@@ -5442,7 +5442,7 @@ class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest {
layer->SetBounds(gfx::Size(10, 10));
layer->SetIsDrawable(true);
- layer_tree()->root_layer()->AddChild(layer);
+ layer_tree_host()->root_layer()->AddChild(layer);
layer_client_.set_bounds(layer_->bounds());
}
@@ -5670,7 +5670,7 @@ class LayerTreeHostTestRenderSurfaceEffectTreeIndex : public LayerTreeHostTest {
child_ = Layer::Create();
grand_child_ = Layer::Create();
- layer_tree()->SetRootLayer(root_);
+ layer_tree_host()->SetRootLayer(root_);
root_->AddChild(child_);
child_->AddChild(grand_child_);
@@ -5717,11 +5717,11 @@ class LayerTreeHostTestRenderSurfaceEffectTreeIndex : public LayerTreeHostTest {
case 2:
// Setting an empty viewport causes draws to get skipped, so the active
// tree won't update draw properties.
- layer_tree()->SetViewportSize(gfx::Size());
+ layer_tree_host()->SetViewportSize(gfx::Size());
child_->SetForceRenderSurfaceForTesting(false);
break;
case 3:
- layer_tree()->SetViewportSize(root_->bounds());
+ layer_tree_host()->SetViewportSize(root_->bounds());
}
}
@@ -5783,7 +5783,7 @@ class LayerTreeHostTestSynchronousCompositeSwapPromise
new TestSwapPromise(&swap_promise_result_[2]));
layer_tree_host()->GetSwapPromiseManager()->QueueSwapPromise(
std::move(swap_promise2));
- layer_tree()->SetNeedsDisplayOnAllLayers();
+ layer_tree_host()->SetNeedsDisplayOnAllLayers();
layer_tree_host()->SetVisible(false);
layer_tree_host()->Composite(base::TimeTicks::Now());
@@ -5857,7 +5857,7 @@ class LayerTreeHostAcceptsDeltasFromImplWithoutRootLayer
: deltas_sent_to_client_(false) {}
void BeginTest() override {
- layer_tree()->SetRootLayer(nullptr);
+ layer_tree_host()->SetRootLayer(nullptr);
info_.page_scale_delta = 3.14f;
info_.top_controls_delta = 2.73f;
@@ -5865,7 +5865,7 @@ class LayerTreeHostAcceptsDeltasFromImplWithoutRootLayer
}
void BeginMainFrame(const BeginFrameArgs& args) override {
- EXPECT_EQ(nullptr, layer_tree()->root_layer());
+ EXPECT_EQ(nullptr, layer_tree_host()->root_layer());
layer_tree_host()->ApplyScrollAndScale(&info_);
EndTest();
@@ -5923,10 +5923,10 @@ class LayerTreeHostTestCrispUpAfterPinchEnds : public LayerTreeHostTest {
// pinch.
pinch->AddChild(layer);
- layer_tree()->RegisterViewportLayers(NULL, page_scale_layer, pinch,
- nullptr);
- layer_tree()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f);
- layer_tree()->SetRootLayer(root_clip);
+ layer_tree_host()->RegisterViewportLayers(NULL, page_scale_layer, pinch,
+ nullptr);
+ layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f);
+ layer_tree_host()->SetRootLayer(root_clip);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_clip->bounds());
}
@@ -6125,7 +6125,7 @@ class RasterizeWithGpuRasterizationCreatesResources : public LayerTreeHostTest {
layer->SetContentsOpaque(true);
root->AddChild(layer);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root->bounds());
}
@@ -6166,9 +6166,9 @@ class GpuRasterizationRasterizesBorderTiles : public LayerTreeHostTest {
client_.set_bounds(root->bounds());
root->SetContentsOpaque(true);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeHostTest::SetupTree();
- layer_tree()->SetViewportSize(viewport_size_);
+ layer_tree_host()->SetViewportSize(viewport_size_);
client_.set_bounds(root->bounds());
}
@@ -6226,10 +6226,10 @@ class LayerTreeHostTestContinuousDrawWhenCreatingVisibleTiles
// pinch.
pinch->AddChild(layer);
- layer_tree()->RegisterViewportLayers(NULL, page_scale_layer, pinch,
- nullptr);
- layer_tree()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f);
- layer_tree()->SetRootLayer(root_clip);
+ layer_tree_host()->RegisterViewportLayers(NULL, page_scale_layer, pinch,
+ nullptr);
+ layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 1.f, 4.f);
+ layer_tree_host()->SetRootLayer(root_clip);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_clip->bounds());
}
@@ -6383,13 +6383,13 @@ class LayerTreeHostTestOneActivatePerPrepareTiles : public LayerTreeHostTest {
root_layer->SetBounds(gfx::Size(1500, 1500));
root_layer->SetIsDrawable(true);
- layer_tree()->SetRootLayer(root_layer);
+ layer_tree_host()->SetRootLayer(root_layer);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer->bounds());
}
void BeginTest() override {
- layer_tree()->SetViewportSize(gfx::Size(16, 16));
+ layer_tree_host()->SetViewportSize(gfx::Size(16, 16));
PostSetNeedsCommitToMainThread();
}
@@ -6439,7 +6439,7 @@ class LayerTreeHostTestActivationCausesPrepareTiles : public LayerTreeHostTest {
root_layer->SetBounds(gfx::Size(150, 150));
root_layer->SetIsDrawable(true);
- layer_tree()->SetRootLayer(root_layer);
+ layer_tree_host()->SetRootLayer(root_layer);
LayerTreeHostTest::SetupTree();
client_.set_bounds(root_layer->bounds());
}
@@ -6517,7 +6517,7 @@ class LayerTreeHostTestUpdateCopyRequests : public LayerTreeHostTest {
root = Layer::Create();
child = Layer::Create();
root->AddChild(child);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeHostTest::SetupTree();
}
@@ -6612,7 +6612,7 @@ class LayerTreeTestMaskLayerForSurfaceWithClippedLayer : public LayerTreeTest {
mask_layer->SetBounds(mask_size);
mask_layer->SetIsMask(true);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeTest::SetupTree();
client_.set_bounds(root->bounds());
}
@@ -6697,7 +6697,7 @@ class LayerTreeTestMaskLayerWithScaling : public LayerTreeTest {
mask_layer->SetBounds(scaling_layer_size);
mask_layer->SetIsMask(true);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeTest::SetupTree();
client_.set_bounds(root->bounds());
}
@@ -6747,8 +6747,8 @@ class LayerTreeTestMaskLayerWithScaling : public LayerTreeTest {
switch (layer_tree_host()->SourceFrameNumber()) {
case 1:
gfx::Size double_root_size(200, 200);
- layer_tree()->SetViewportSize(double_root_size);
- layer_tree()->SetDeviceScaleFactor(2.f);
+ layer_tree_host()->SetViewportSize(double_root_size);
+ layer_tree_host()->SetDeviceScaleFactor(2.f);
break;
}
}
@@ -6786,7 +6786,7 @@ class LayerTreeTestMaskLayerWithDifferentBounds : public LayerTreeTest {
mask_layer->SetBounds(mask_size);
mask_layer->SetIsMask(true);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeTest::SetupTree();
client_.set_bounds(root->bounds());
}
@@ -6835,8 +6835,8 @@ class LayerTreeTestMaskLayerWithDifferentBounds : public LayerTreeTest {
switch (layer_tree_host()->SourceFrameNumber()) {
case 1:
gfx::Size double_root_size(200, 200);
- layer_tree()->SetViewportSize(double_root_size);
- layer_tree()->SetDeviceScaleFactor(2.f);
+ layer_tree_host()->SetViewportSize(double_root_size);
+ layer_tree_host()->SetDeviceScaleFactor(2.f);
break;
}
}
@@ -6875,13 +6875,13 @@ class LayerTreeTestPageScaleFlags : public LayerTreeTest {
page_scale->AddChild(page_scale_child2);
page_scale_child1->AddChild(page_scale_grandchild);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeTest::SetupTree();
scoped_refptr<Layer> overscroll_elasticity_layer = nullptr;
scoped_refptr<Layer> inner_viewport_scroll_layer = nullptr;
scoped_refptr<Layer> outer_viewport_scroll_layer = nullptr;
- layer_tree()->RegisterViewportLayers(
+ layer_tree_host()->RegisterViewportLayers(
overscroll_elasticity_layer, page_scale, inner_viewport_scroll_layer,
outer_viewport_scroll_layer);
@@ -6940,8 +6940,8 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestDestroyWhileInitializingOutputSurface);
class LayerTreeHostTestPaintedDeviceScaleFactor : public LayerTreeHostTest {
protected:
void BeginTest() override {
- layer_tree()->SetPaintedDeviceScaleFactor(2.0f);
- EXPECT_EQ(1.0f, layer_tree()->device_scale_factor());
+ layer_tree_host()->SetPaintedDeviceScaleFactor(2.0f);
+ EXPECT_EQ(1.0f, layer_tree_host()->device_scale_factor());
PostSetNeedsCommitToMainThread();
}
@@ -7005,9 +7005,9 @@ class GpuRasterizationSucceedsWithLargeImage : public LayerTreeHostTest {
client_.set_bounds(root->bounds());
root->SetContentsOpaque(true);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeHostTest::SetupTree();
- layer_tree()->SetViewportSize(viewport_size_);
+ layer_tree_host()->SetViewportSize(viewport_size_);
client_.set_bounds(root->bounds());
}
@@ -7046,7 +7046,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage);
class LayerTreeHostTestSubmitFrameMetadata : public LayerTreeHostTest {
protected:
void BeginTest() override {
- layer_tree()->SetPageScaleFactorAndLimits(1.f, 0.5f, 4.f);
+ layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 4.f);
PostSetNeedsCommitToMainThread();
}
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_tiles.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698