| 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 8dcb6d7ad1ee45ed44ed7cbf7d581164a420e9d8..5f6872e582f5e24d53dbf7d65726f50d4344344b 100644
|
| --- a/cc/trees/layer_tree_host_common_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_common_unittest.cc
|
| @@ -119,7 +119,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForNoOpLayer) {
|
| parent->AddChild(child);
|
| child->AddChild(grand_child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -163,7 +163,7 @@ TEST_F(LayerTreeHostCommonTest, DoNotSkipLayersWithHandlers) {
|
| parent->AddChild(child);
|
| child->AddChild(grand_child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -216,7 +216,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) {
|
| false);
|
| root->AddChild(layer);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| // Case 2: Setting the bounds of the layer should not affect either the draw
|
| @@ -425,7 +425,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSimpleHierarchy) {
|
| parent->AddChild(child);
|
| child->AddChild(grand_child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| // One-time setup of root layer
|
| @@ -552,7 +552,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleRenderSurface) {
|
| parent->AddChild(child);
|
| child->AddChild(grand_child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| // One-time setup of root layer
|
| @@ -649,7 +649,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForReplica) {
|
| child->AddChild(grand_child);
|
| child->SetReplicaLayer(child_replica.get());
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| // One-time setup of root layer
|
| @@ -770,7 +770,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForRenderSurfaceHierarchy) {
|
| render_surface1->SetReplicaLayer(replica_of_rs1.get());
|
| render_surface2->SetReplicaLayer(replica_of_rs2.get());
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| // In combination with descendant draws content, opacity != 1 forces the layer
|
| @@ -1065,7 +1065,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForFlatteningLayer) {
|
| child->AddChild(grand_child);
|
| child->SetForceRenderSurface(true);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| // No layers in this test should preserve 3d.
|
| @@ -1144,7 +1144,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForDegenerateIntermediateLayer) {
|
| child->AddChild(grand_child);
|
| child->SetForceRenderSurface(true);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -1169,7 +1169,7 @@ TEST_F(LayerTreeHostCommonTest, TransformAboveRootLayer) {
|
| child->SetScrollClipLayerId(root->id());
|
| root->AddChild(child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| SetLayerPropertiesForTesting(root.get(),
|
| @@ -1315,7 +1315,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| scoped_refptr<LayerWithForcedDrawsContent> child =
|
| make_scoped_refptr(new LayerWithForcedDrawsContent());
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| const gfx::Transform identity_matrix;
|
| @@ -1369,7 +1369,7 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceListForTransparentChild) {
|
| scoped_refptr<LayerWithForcedDrawsContent> child =
|
| make_scoped_refptr(new LayerWithForcedDrawsContent());
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| const gfx::Transform identity_matrix;
|
| @@ -1416,7 +1416,7 @@ TEST_F(LayerTreeHostCommonTest, ForceRenderSurface) {
|
| make_scoped_refptr(new LayerWithForcedDrawsContent());
|
| render_surface1->SetForceRenderSurface(true);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| const gfx::Transform identity_matrix;
|
| @@ -1505,7 +1505,7 @@ TEST_F(LayerTreeHostCommonTest, ClipRectCullsRenderSurfaces) {
|
| child->AddChild(grand_child);
|
| grand_child->AddChild(great_grand_child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| // leaf_node1 ensures that parent and child are kept on the
|
| @@ -1603,7 +1603,7 @@ TEST_F(LayerTreeHostCommonTest, ClipRectCullsSurfaceWithoutVisibleContent) {
|
| child->AddChild(grand_child);
|
| grand_child->AddChild(leaf_node);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| SetLayerPropertiesForTesting(parent.get(),
|
| @@ -1705,7 +1705,7 @@ TEST_F(LayerTreeHostCommonTest, IsClippedIsSetCorrectly) {
|
| child2->AddChild(leaf_node2);
|
| grand_child->AddChild(leaf_node1);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| child2->SetForceRenderSurface(true);
|
| @@ -1863,7 +1863,7 @@ TEST_F(LayerTreeHostCommonTest, DrawableContentRectForLayers) {
|
| child->AddChild(grand_child3);
|
| child->AddChild(grand_child4);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| SetLayerPropertiesForTesting(parent.get(),
|
| @@ -1964,7 +1964,7 @@ TEST_F(LayerTreeHostCommonTest, ClipRectIsPropagatedCorrectlyToSurfaces) {
|
| child->AddChild(grand_child3);
|
| child->AddChild(grand_child4);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| // the leaf nodes ensure that these grand_children become render surfaces for
|
| @@ -2101,7 +2101,7 @@ TEST_F(LayerTreeHostCommonTest, AnimationsForRenderSurfaceHierarchy) {
|
| child_of_rs1->AddChild(grand_child_of_rs1);
|
| child_of_rs2->AddChild(grand_child_of_rs2);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| // Make our render surfaces.
|
| @@ -2589,7 +2589,7 @@ TEST_F(LayerTreeHostCommonTest, DrawableAndVisibleContentRectsForSimpleLayers) {
|
| root->AddChild(child2);
|
| root->AddChild(child3);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -2657,7 +2657,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| child->AddChild(grand_child2);
|
| child->AddChild(grand_child3);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -2738,7 +2738,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| render_surface1->AddChild(child2);
|
| render_surface1->AddChild(child3);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -2814,7 +2814,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| make_scoped_refptr(new LayerWithForcedDrawsContent());
|
| root->AddChild(child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| // Case 1: a truly degenerate matrix
|
| @@ -2888,7 +2888,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| make_scoped_refptr(new LayerWithForcedDrawsContent());
|
| root->AddChild(child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -2932,7 +2932,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| SingularNonAnimatingTransformDoesNotPreventClearingDrawProperties) {
|
| scoped_refptr<Layer> root = Layer::Create();
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -2971,7 +2971,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| render_surface1->AddChild(child2);
|
| render_surface1->AddChild(child3);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -3061,7 +3061,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| render_surface2->AddChild(child2);
|
| render_surface2->AddChild(child3);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -3161,7 +3161,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| root->AddChild(render_surface1);
|
| render_surface1->AddChild(child1);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -3232,7 +3232,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| root->AddChild(render_surface1);
|
| render_surface1->AddChild(child1);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -3307,7 +3307,7 @@ TEST_F(LayerTreeHostCommonTest, DrawableAndVisibleContentRectsInHighDPI) {
|
| render_surface2->AddChild(child2);
|
| render_surface2->AddChild(child3);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -3434,7 +3434,7 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithoutPreserves3d) {
|
| back_facing_surface->AddChild(front_facing_child_of_back_facing_surface);
|
| back_facing_surface->AddChild(back_facing_child_of_back_facing_surface);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| // Nothing is double-sided
|
| @@ -3640,7 +3640,7 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithPreserves3d) {
|
| back_facing_surface->AddChild(front_facing_child_of_back_facing_surface);
|
| back_facing_surface->AddChild(back_facing_child_of_back_facing_surface);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| // Nothing is double-sided
|
| @@ -3806,7 +3806,7 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithAnimatingTransforms) {
|
| parent->AddChild(animating_child);
|
| parent->AddChild(child2);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| // Nothing is double-sided
|
| @@ -3952,7 +3952,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| front_facing_surface->AddChild(child1);
|
| back_facing_surface->AddChild(child2);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| // RenderSurfaces are not double-sided
|
| @@ -4128,7 +4128,7 @@ TEST_F(LayerTreeHostCommonTest, LayerTransformsInHighDPI) {
|
| parent->AddChild(child_empty);
|
| parent->AddChild(child_no_scale);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| float device_scale_factor = 2.5f;
|
| @@ -4266,7 +4266,7 @@ TEST_F(LayerTreeHostCommonTest, SurfaceLayerTransformsInHighDPI) {
|
| parent->AddChild(scale_surface);
|
| root->AddChild(parent);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| float device_scale_factor = 2.5f;
|
| @@ -4365,7 +4365,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| parent->AddChild(child);
|
| parent->AddChild(child_no_scale);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| float device_scale_factor = 1.7f;
|
| @@ -4503,7 +4503,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScale) {
|
| parent->AddChild(child_empty);
|
| parent->AddChild(child_no_scale);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| float device_scale_factor = 2.5f;
|
| @@ -4687,7 +4687,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| parent->AddChild(child_empty);
|
| parent->AddChild(child_no_scale);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| RenderSurfaceLayerList render_surface_layer_list;
|
| @@ -4769,7 +4769,7 @@ TEST_F(LayerTreeHostCommonTest, SmallContentsScale) {
|
|
|
| parent->AddChild(child_scale);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| float device_scale_factor = 2.5f;
|
| @@ -4917,7 +4917,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForSurfaces) {
|
| surface_no_scale->AddChild(surface_no_scale_child_scale);
|
| surface_no_scale->AddChild(surface_no_scale_child_no_scale);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| SkMScalar device_scale_factor = 5;
|
| @@ -5118,7 +5118,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| surface_no_scale->AddChild(surface_no_scale_child_scale);
|
| surface_no_scale->AddChild(surface_no_scale_child_no_scale);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| RenderSurfaceLayerList render_surface_layer_list;
|
| @@ -5261,7 +5261,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForAnimatingLayer) {
|
|
|
| parent->AddChild(child_scale);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| // Now put an animating transform on child.
|
| @@ -5306,7 +5306,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| scoped_refptr<Layer> child = CreateDrawableContentLayer(&delegate);
|
| root->AddChild(child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| gfx::Transform identity_matrix;
|
| @@ -5400,7 +5400,7 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceTransformsInHighDPI) {
|
| child->AddChild(duplicate_child_non_owner);
|
| child->SetReplicaLayer(replica.get());
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| RenderSurfaceLayerList render_surface_layer_list;
|
| @@ -5535,7 +5535,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| child->AddChild(duplicate_child_non_owner);
|
| child->SetReplicaLayer(replica.get());
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(parent);
|
|
|
| float device_scale_factor = 1.7f;
|
| @@ -5600,7 +5600,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeSearch) {
|
| child->SetMaskLayer(mask_layer.get());
|
| root->AddChild(child.get());
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| int nonexistent_id = -1;
|
| @@ -5654,7 +5654,7 @@ TEST_F(LayerTreeHostCommonTest, TransparentChildRenderSurfaceCreation) {
|
| child->AddChild(grand_child);
|
| child->SetOpacity(0.5f);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -5747,7 +5747,7 @@ class LCDTextTest
|
|
|
| child_->SetForceRenderSurface(std::tr1::get<1>(GetParam()));
|
|
|
| - host_ = FakeLayerTreeHost::Create();
|
| + host_ = CreateFakeLayerTreeHost();
|
| host_->SetRootLayer(root_);
|
| }
|
|
|
| @@ -5903,7 +5903,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayer) {
|
| child->AddChild(grand_child);
|
| root->AddChild(child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| RenderSurfaceLayerList render_surface_layer_list;
|
| @@ -6017,7 +6017,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayers) {
|
| child->AddChild(grand_child);
|
| root->AddChild(child);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| RenderSurfaceLayerList render_surface_layer_list;
|
| @@ -6175,7 +6175,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
|
| root->AddChild(copy_grand_parent);
|
| root->AddChild(copy_grand_parent_sibling_after);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| // Hide the copy_grand_parent and its subtree. But make a copy request in that
|
| @@ -6289,7 +6289,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedOutCopyRequest) {
|
| copy_parent->AddChild(copy_layer);
|
| root->AddChild(copy_parent);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| copy_layer->RequestCopyOfOutput(CopyOutputRequest::CreateRequest(
|
| @@ -6353,7 +6353,7 @@ TEST_F(LayerTreeHostCommonTest, VisibleContentRectInsideSurface) {
|
| surface->AddChild(surface_child);
|
| root->AddChild(surface);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| RenderSurfaceLayerList render_surface_layer_list;
|
| @@ -6440,7 +6440,7 @@ TEST_F(LayerTreeHostCommonTest, TransformedClipParent) {
|
| true,
|
| false);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -6551,7 +6551,7 @@ TEST_F(LayerTreeHostCommonTest, ClipParentWithInterveningRenderSurface) {
|
| true,
|
| false);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -6680,7 +6680,7 @@ TEST_F(LayerTreeHostCommonTest, ClipParentScrolledInterveningLayer) {
|
| true,
|
| false);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -6789,7 +6789,7 @@ TEST_F(LayerTreeHostCommonTest, DescendantsOfClipChildren) {
|
| true,
|
| false);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -6886,7 +6886,7 @@ TEST_F(LayerTreeHostCommonTest,
|
| render_surface1->SetForceRenderSurface(true);
|
| render_surface2->SetForceRenderSurface(true);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -7041,7 +7041,7 @@ TEST_F(LayerTreeHostCommonTest, DoNotIncludeBackfaceInvisibleSurfaces) {
|
| render_surface->SetDoubleSided(false);
|
| render_surface->SetForceRenderSurface(true);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -7132,7 +7132,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedByScrollParent) {
|
| true,
|
| false);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -7181,7 +7181,7 @@ TEST_F(LayerTreeHostCommonTest, SingularTransformSubtreesDoNotDraw) {
|
| true);
|
| child->SetForceRenderSurface(true);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -7273,7 +7273,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedByOutOfOrderScrollParent) {
|
| true,
|
| false);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -7386,7 +7386,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedByOutOfOrderScrollGrandparent) {
|
| true,
|
| false);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| ExecuteCalculateDrawProperties(root.get());
|
| @@ -7535,7 +7535,7 @@ TEST_F(LayerTreeHostCommonTest, OutOfOrderClippingRequiresRSLLSorting) {
|
| true,
|
| false);
|
|
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
|
| + scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
|
| host->SetRootLayer(root);
|
|
|
| RenderSurfaceLayerList render_surface_layer_list;
|
|
|