diff options
author | danakj <danakj@chromium.org> | 2015-06-17 20:09:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-18 03:10:29 +0000 |
commit | 3b8b2bf9055bcfe082caab8d62e2162db3f78a00 (patch) | |
tree | 8abcdea911e502f95c85c85762374bf98d6c0f65 | |
parent | ddcaa1dec3569e46b23ca42ac2afb3de88c9eee9 (diff) | |
download | chromium_src-3b8b2bf9055bcfe082caab8d62e2162db3f78a00.zip chromium_src-3b8b2bf9055bcfe082caab8d62e2162db3f78a00.tar.gz chromium_src-3b8b2bf9055bcfe082caab8d62e2162db3f78a00.tar.bz2 |
cc: Remove LayerImpl::SetContentBounds()
The method is now empty, remove all callsites, which are by far
mostly all tests at this point.
R=enne, vmpstr
BUG=413479
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1180073015
Cr-Commit-Position: refs/heads/master@{#334989}
24 files changed, 3 insertions, 157 deletions
diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc index b5743dd..7fe6249 100644 --- a/cc/layers/delegated_renderer_layer_impl_unittest.cc +++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc @@ -72,19 +72,16 @@ class DelegatedRendererLayerImplTestSimple layer_before->SetPosition(gfx::Point(20, 20)); layer_before->SetBounds(gfx::Size(14, 14)); - layer_before->SetContentBounds(gfx::Size(14, 14)); layer_before->SetDrawsContent(true); layer_before->SetHasRenderSurface(true); layer_after->SetPosition(gfx::Point(5, 5)); layer_after->SetBounds(gfx::Size(15, 15)); - layer_after->SetContentBounds(gfx::Size(15, 15)); layer_after->SetDrawsContent(true); layer_after->SetHasRenderSurface(true); delegated_renderer_layer->SetPosition(gfx::Point(3, 3)); delegated_renderer_layer->SetBounds(gfx::Size(10, 10)); - delegated_renderer_layer->SetContentBounds(gfx::Size(10, 10)); delegated_renderer_layer->SetDrawsContent(true); gfx::Transform transform; transform.Translate(1.0, 1.0); @@ -148,7 +145,6 @@ TEST_F(DelegatedRendererLayerImplTest, delegated_renderer_layer->SetPosition(gfx::Point(3, 3)); delegated_renderer_layer->SetBounds(gfx::Size(10, 10)); - delegated_renderer_layer->SetContentBounds(gfx::Size(10, 10)); delegated_renderer_layer->SetDrawsContent(true); delegated_renderer_layer->SetHasRenderSurface(true); gfx::Transform transform; @@ -228,7 +224,6 @@ TEST_F(DelegatedRendererLayerImplTest, delegated_renderer_layer->SetPosition(gfx::Point(3, 3)); delegated_renderer_layer->SetBounds(gfx::Size(10, 10)); - delegated_renderer_layer->SetContentBounds(gfx::Size(10, 10)); delegated_renderer_layer->SetDrawsContent(true); delegated_renderer_layer->SetHasRenderSurface(true); gfx::Transform transform; @@ -633,7 +628,6 @@ class DelegatedRendererLayerImplTestTransform delegated_renderer_layer->SetPosition(gfx::Point(20, 20)); delegated_renderer_layer->SetBounds(gfx::Size(75, 75)); - delegated_renderer_layer->SetContentBounds(gfx::Size(75, 75)); delegated_renderer_layer->SetDrawsContent(true); gfx::Transform transform; transform.Scale(2.0, 2.0); @@ -1066,7 +1060,6 @@ class DelegatedRendererLayerImplTestClip delegated_renderer_layer->SetPosition(gfx::Point(20, 20)); delegated_renderer_layer->SetBounds(gfx::Size(50, 50)); - delegated_renderer_layer->SetContentBounds(gfx::Size(50, 50)); delegated_renderer_layer->SetDrawsContent(true); RenderPassList delegated_render_passes; @@ -1174,7 +1167,6 @@ class DelegatedRendererLayerImplTestClip clip_layer->SetPosition(clip_rect.origin()); clip_layer->SetBounds(clip_rect.size()); - clip_layer->SetContentBounds(clip_rect.size()); clip_layer->SetMasksToBounds(true); origin_layer->SetPosition( @@ -1446,7 +1438,6 @@ TEST_F(DelegatedRendererLayerImplTest, Occlusion) { FakeDelegatedRendererLayerImpl* delegated_renderer_layer_impl = impl.AddChildToRoot<FakeDelegatedRendererLayerImpl>(); delegated_renderer_layer_impl->SetBounds(layer_size); - delegated_renderer_layer_impl->SetContentBounds(layer_size); delegated_renderer_layer_impl->SetDrawsContent(true); // Contributing render pass is offset by a transform and holds a quad that @@ -1614,7 +1605,6 @@ TEST_F(DelegatedRendererLayerImplTest, DeviceScaleFactorOcclusion) { FakeDelegatedRendererLayerImpl* delegated_renderer_layer_impl = impl.AddChildToRoot<FakeDelegatedRendererLayerImpl>(); delegated_renderer_layer_impl->SetBounds(layer_size); - delegated_renderer_layer_impl->SetContentBounds(layer_size); delegated_renderer_layer_impl->SetDrawsContent(true); // Contributing render pass is offset by a transform and holds a quad that @@ -1672,7 +1662,6 @@ TEST_F(DelegatedRendererLayerImplTest, PushPropertiesTo) { scoped_ptr<FakeDelegatedRendererLayerImpl> delegated_renderer_layer_impl = FakeDelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 5); delegated_renderer_layer_impl->SetBounds(layer_size); - delegated_renderer_layer_impl->SetContentBounds(layer_size); delegated_renderer_layer_impl->SetDrawsContent(true); RenderPassList delegated_render_passes; diff --git a/cc/layers/io_surface_layer_impl_unittest.cc b/cc/layers/io_surface_layer_impl_unittest.cc index 1c9256c..0ef2ec8 100644 --- a/cc/layers/io_surface_layer_impl_unittest.cc +++ b/cc/layers/io_surface_layer_impl_unittest.cc @@ -19,7 +19,6 @@ TEST(IOSurfaceLayerImplTest, Occlusion) { IOSurfaceLayerImpl* io_surface_layer_impl = impl.AddChildToRoot<IOSurfaceLayerImpl>(); io_surface_layer_impl->SetBounds(layer_size); - io_surface_layer_impl->SetContentBounds(layer_size); io_surface_layer_impl->SetDrawsContent(true); io_surface_layer_impl->SetIOSurfaceProperties(1, gfx::Size(1, 1)); diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index d1c173e..25de9a4 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc @@ -1154,7 +1154,6 @@ void Layer::PushPropertiesTo(LayerImpl* layer) { layer->SetBounds(use_paint_properties ? paint_properties_.bounds : bounds_); layer->SetContentsScale(1.f, 1.f); - layer->SetContentBounds(bounds()); if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots()) layer->SetDebugInfo(TakeDebugInfo()); diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc index d4b1089..04ad44f 100644 --- a/cc/layers/layer_impl.cc +++ b/cc/layers/layer_impl.cc @@ -530,7 +530,6 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) { layer->SetTransformOrigin(transform_origin_); layer->SetBackgroundColor(background_color_); layer->SetBounds(bounds_); - layer->SetContentBounds(bounds_); layer->SetContentsScale(contents_scale_x(), contents_scale_y()); layer->SetDoubleSided(double_sided_); layer->SetDrawCheckerboardForMissingTiles( @@ -1148,10 +1147,6 @@ void LayerImpl::AddDamageRect(const gfx::RectF& damage_rect) { damage_rect_ = gfx::UnionRects(damage_rect_, damage_rect); } -// TODO(danakj): Remove this after impl_side_painting. -void LayerImpl::SetContentBounds(const gfx::Size& content_bounds) { -} - void LayerImpl::SetContentsScale(float contents_scale_x, float contents_scale_y) { if (this->contents_scale_x() == contents_scale_x && diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h index 258e27a..47ca9e3 100644 --- a/cc/layers/layer_impl.h +++ b/cc/layers/layer_impl.h @@ -421,8 +421,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver, void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); gfx::Vector2dF bounds_delta() const { return bounds_delta_; } - void SetContentBounds(const gfx::Size& content_bounds); - float contents_scale_x() const { return draw_properties_.contents_scale_x; } float contents_scale_y() const { return draw_properties_.contents_scale_y; } void SetContentsScale(float contents_scale_x, float contents_scale_y); diff --git a/cc/layers/nine_patch_layer_impl_unittest.cc b/cc/layers/nine_patch_layer_impl_unittest.cc index 8537ddb..2e230ee 100644 --- a/cc/layers/nine_patch_layer_impl_unittest.cc +++ b/cc/layers/nine_patch_layer_impl_unittest.cc @@ -54,7 +54,6 @@ void NinePatchLayerLayoutTest(const gfx::Size& bitmap_size, NinePatchLayerImpl::Create(host_impl.active_tree(), 1); layer->draw_properties().visible_content_rect = visible_content_rect; layer->SetBounds(layer_size); - layer->SetContentBounds(layer_size); layer->SetHasRenderSurface(true); layer->draw_properties().render_target = layer.get(); @@ -231,7 +230,6 @@ TEST(NinePatchLayerImplTest, Occlusion) { NinePatchLayerImpl* nine_patch_layer_impl = impl.AddChildToRoot<NinePatchLayerImpl>(); nine_patch_layer_impl->SetBounds(layer_size); - nine_patch_layer_impl->SetContentBounds(layer_size); nine_patch_layer_impl->SetDrawsContent(true); nine_patch_layer_impl->SetUIResourceId(uid); nine_patch_layer_impl->SetImageBounds(gfx::Size(10, 10)); @@ -304,7 +302,6 @@ TEST(NinePatchLayerImplTest, OpaqueRect) { NinePatchLayerImpl *nine_patch_layer_impl = impl.AddChildToRoot<NinePatchLayerImpl>(); nine_patch_layer_impl->SetBounds(layer_size); - nine_patch_layer_impl->SetContentBounds(layer_size); nine_patch_layer_impl->SetDrawsContent(true); impl.CalcDrawProps(viewport_size); diff --git a/cc/layers/painted_scrollbar_layer_impl_unittest.cc b/cc/layers/painted_scrollbar_layer_impl_unittest.cc index 3fb3fb2..5a7229f 100644 --- a/cc/layers/painted_scrollbar_layer_impl_unittest.cc +++ b/cc/layers/painted_scrollbar_layer_impl_unittest.cc @@ -38,7 +38,6 @@ TEST(PaintedScrollbarLayerImplTest, Occlusion) { PaintedScrollbarLayerImpl* scrollbar_layer_impl = impl.AddChildToRoot<PaintedScrollbarLayerImpl>(orientation); scrollbar_layer_impl->SetBounds(layer_size); - scrollbar_layer_impl->SetContentBounds(layer_size); scrollbar_layer_impl->SetContentsOpaque(true); scrollbar_layer_impl->set_internal_contents_scale_and_bounds( scale, scaled_layer_size); diff --git a/cc/layers/picture_image_layer_impl_unittest.cc b/cc/layers/picture_image_layer_impl_unittest.cc index cef2d5e..4082913 100644 --- a/cc/layers/picture_image_layer_impl_unittest.cc +++ b/cc/layers/picture_image_layer_impl_unittest.cc @@ -59,7 +59,6 @@ class PictureImageLayerImplTest : public testing::Test { new TestablePictureImageLayerImpl(tree, id); layer->raster_source_ = FakePicturePileImpl::CreateInfiniteFilledPile(); layer->SetBounds(layer->raster_source_->GetSize()); - layer->SetContentBounds(layer->raster_source_->GetSize()); return make_scoped_ptr(layer); } diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc index 18ca3a9..0f251f6 100644 --- a/cc/layers/picture_layer_impl_unittest.cc +++ b/cc/layers/picture_layer_impl_unittest.cc @@ -223,7 +223,6 @@ class PictureLayerImplTest : public testing::Test { pending_root->SetHasRenderSurface(true); // The bounds() just mirror the pile size. pending_layer->SetBounds(raster_source->GetSize()); - pending_layer->SetContentBounds(raster_source->GetSize()); pending_layer->SetRasterSourceOnPending(raster_source, invalidation); pending_root->AddChild(pending_layer.Pass()); @@ -1295,7 +1294,6 @@ TEST_F(PictureLayerImplTest, DontAddLowResForSmallLayers) { FakePictureLayerImpl::CreateMaskWithRasterSource( host_impl_.pending_tree(), 3, pending_pile); mask->SetBounds(layer_bounds); - mask->SetContentBounds(layer_bounds); mask->SetDrawsContent(true); SetupDrawPropertiesAndUpdateTiles( @@ -1319,7 +1317,6 @@ TEST_F(PictureLayerImplTest, HugeMasksGetScaledDown) { FakePictureLayerImpl::CreateMaskWithRasterSource( host_impl_.pending_tree(), 3, valid_pile); mask_ptr->SetBounds(layer_bounds); - mask_ptr->SetContentBounds(layer_bounds); mask_ptr->SetDrawsContent(true); pending_layer_->SetMaskLayer(mask_ptr.Pass()); pending_layer_->SetHasRenderSurface(true); @@ -1371,7 +1368,6 @@ TEST_F(PictureLayerImplTest, HugeMasksGetScaledDown) { SetupPendingTree(huge_pile); pending_mask->SetBounds(huge_bounds); - pending_mask->SetContentBounds(huge_bounds); pending_mask->SetRasterSourceOnPending(huge_pile, Region()); host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); @@ -1424,7 +1420,6 @@ TEST_F(PictureLayerImplTest, HugeMasksGetScaledDown) { SetupPendingTree(extra_huge_pile); pending_mask->SetBounds(extra_huge_bounds); - pending_mask->SetContentBounds(extra_huge_bounds); pending_mask->SetRasterSourceOnPending(extra_huge_pile, Region()); EXPECT_FALSE(pending_mask->CanHaveTilings()); @@ -1451,7 +1446,6 @@ TEST_F(PictureLayerImplTest, ScaledMaskLayer) { FakePictureLayerImpl::CreateMaskWithRasterSource( host_impl_.pending_tree(), 3, valid_pile); mask_ptr->SetBounds(layer_bounds); - mask_ptr->SetContentBounds(layer_bounds); mask_ptr->SetDrawsContent(true); pending_layer_->SetMaskLayer(mask_ptr.Pass()); pending_layer_->SetHasRenderSurface(true); @@ -3976,7 +3970,6 @@ TEST_F(OcclusionTrackingPictureLayerImplTest, pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 1)); LayerImpl* layer1 = pending_layer_->children()[0]; layer1->SetBounds(layer_bounds); - layer1->SetContentBounds(layer_bounds); layer1->SetDrawsContent(true); layer1->SetContentsOpaque(true); layer1->SetPosition(occluding_layer_position); @@ -4072,7 +4065,6 @@ TEST_F(OcclusionTrackingPictureLayerImplTest, pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 1)); LayerImpl* layer1 = pending_layer_->children()[0]; layer1->SetBounds(layer_bounds); - layer1->SetContentBounds(layer_bounds); layer1->SetDrawsContent(true); layer1->SetContentsOpaque(true); layer1->SetPosition(occluding_layer_position); @@ -4173,7 +4165,6 @@ TEST_F(OcclusionTrackingPictureLayerImplTest, OcclusionForDifferentScales) { pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 1)); LayerImpl* layer1 = pending_layer_->children()[0]; layer1->SetBounds(layer_bounds); - layer1->SetContentBounds(layer_bounds); layer1->SetDrawsContent(true); layer1->SetContentsOpaque(true); layer1->SetPosition(occluding_layer_position); @@ -4249,7 +4240,6 @@ TEST_F(OcclusionTrackingPictureLayerImplTest, DifferentOcclusionOnTrees) { pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 2)); LayerImpl* layer1 = pending_layer_->children()[0]; layer1->SetBounds(layer_bounds); - layer1->SetContentBounds(layer_bounds); layer1->SetDrawsContent(true); layer1->SetContentsOpaque(true); layer1->SetPosition(occluding_layer_position); @@ -4343,7 +4333,6 @@ TEST_F(OcclusionTrackingPictureLayerImplTest, pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 2)); LayerImpl* active_occluding_layer = pending_layer_->children()[0]; active_occluding_layer->SetBounds(layer_bounds); - active_occluding_layer->SetContentBounds(layer_bounds); active_occluding_layer->SetDrawsContent(true); active_occluding_layer->SetContentsOpaque(true); active_occluding_layer->SetPosition(active_occluding_layer_position); @@ -4358,7 +4347,6 @@ TEST_F(OcclusionTrackingPictureLayerImplTest, pending_layer_->AddChild(LayerImpl::Create(host_impl_.pending_tree(), 3)); LayerImpl* pending_occluding_layer = pending_layer_->children()[0]; pending_occluding_layer->SetBounds(layer_bounds); - pending_occluding_layer->SetContentBounds(layer_bounds); pending_occluding_layer->SetDrawsContent(true); pending_occluding_layer->SetContentsOpaque(true); pending_occluding_layer->SetPosition(pending_occluding_layer_position); diff --git a/cc/layers/render_surface_impl_unittest.cc b/cc/layers/render_surface_impl_unittest.cc index 9934cd6..e5db867 100644 --- a/cc/layers/render_surface_impl_unittest.cc +++ b/cc/layers/render_surface_impl_unittest.cc @@ -18,7 +18,6 @@ TEST(RenderSurfaceLayerImplTest, Occlusion) { LayerImpl* owning_layer_impl = impl.AddChildToRoot<LayerImpl>(); owning_layer_impl->SetBounds(layer_size); - owning_layer_impl->SetContentBounds(layer_size); owning_layer_impl->SetDrawsContent(true); owning_layer_impl->SetHasRenderSurface(true); diff --git a/cc/layers/solid_color_layer_impl_unittest.cc b/cc/layers/solid_color_layer_impl_unittest.cc index 8d32780..ed33026 100644 --- a/cc/layers/solid_color_layer_impl_unittest.cc +++ b/cc/layers/solid_color_layer_impl_unittest.cc @@ -33,7 +33,6 @@ TEST(SolidColorLayerImplTest, VerifyTilingCompleteAndNoOverlap) { SolidColorLayerImpl::Create(host_impl.active_tree(), 1); layer->draw_properties().visible_content_rect = visible_content_rect; layer->SetBounds(layer_size); - layer->SetContentBounds(layer_size); layer->SetHasRenderSurface(true); layer->draw_properties().render_target = layer.get(); @@ -59,7 +58,6 @@ TEST(SolidColorLayerImplTest, VerifyCorrectBackgroundColorInQuad) { SolidColorLayerImpl::Create(host_impl.active_tree(), 1); layer->draw_properties().visible_content_rect = visible_content_rect; layer->SetBounds(layer_size); - layer->SetContentBounds(layer_size); layer->SetBackgroundColor(test_color); layer->SetHasRenderSurface(true); layer->draw_properties().render_target = layer.get(); @@ -88,7 +86,6 @@ TEST(SolidColorLayerImplTest, VerifyCorrectOpacityInQuad) { SolidColorLayerImpl::Create(host_impl.active_tree(), 1); layer->draw_properties().visible_content_rect = visible_content_rect; layer->SetBounds(layer_size); - layer->SetContentBounds(layer_size); layer->draw_properties().opacity = opacity; layer->SetHasRenderSurface(true); layer->draw_properties().render_target = layer.get(); @@ -116,7 +113,6 @@ TEST(SolidColorLayerImplTest, VerifyCorrectBlendModeInQuad) { scoped_ptr<SolidColorLayerImpl> layer = SolidColorLayerImpl::Create(host_impl.active_tree(), 1); layer->SetBounds(layer_size); - layer->SetContentBounds(layer_size); layer->draw_properties().blend_mode = blend_mode; AppendQuadsData data; @@ -215,7 +211,6 @@ TEST(SolidColorLayerImplTest, Occlusion) { impl.AddChildToRoot<SolidColorLayerImpl>(); solid_color_layer_impl->SetBackgroundColor(SkColorSetARGB(255, 10, 20, 30)); solid_color_layer_impl->SetBounds(layer_size); - solid_color_layer_impl->SetContentBounds(layer_size); solid_color_layer_impl->SetDrawsContent(true); impl.CalcDrawProps(viewport_size); diff --git a/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc b/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc index b27c84b..a8d59e5 100644 --- a/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc +++ b/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc @@ -30,7 +30,6 @@ TEST(SolidColorScrollbarLayerImplTest, Occlusion) { is_left_side_vertical_scrollbar, is_overlay); scrollbar_layer_impl->SetBounds(layer_size); - scrollbar_layer_impl->SetContentBounds(layer_size); scrollbar_layer_impl->SetDrawsContent(true); scrollbar_layer_impl->SetCurrentPos(100.f / 4); scrollbar_layer_impl->SetMaximum(100); diff --git a/cc/layers/surface_layer_impl_unittest.cc b/cc/layers/surface_layer_impl_unittest.cc index 39577a3..ab0db38 100644 --- a/cc/layers/surface_layer_impl_unittest.cc +++ b/cc/layers/surface_layer_impl_unittest.cc @@ -19,7 +19,6 @@ TEST(SurfaceLayerImplTest, Occlusion) { SurfaceLayerImpl* surface_layer_impl = impl.AddChildToRoot<SurfaceLayerImpl>(); surface_layer_impl->SetBounds(layer_size); - surface_layer_impl->SetContentBounds(layer_size); surface_layer_impl->SetDrawsContent(true); SurfaceId surface_id(9); surface_layer_impl->SetSurfaceId(surface_id); diff --git a/cc/layers/texture_layer_impl_unittest.cc b/cc/layers/texture_layer_impl_unittest.cc index cbe80e1..d3f660e 100644 --- a/cc/layers/texture_layer_impl_unittest.cc +++ b/cc/layers/texture_layer_impl_unittest.cc @@ -31,7 +31,6 @@ TEST(TextureLayerImplTest, Occlusion) { TextureLayerImpl* texture_layer_impl = impl.AddChildToRoot<TextureLayerImpl>(); texture_layer_impl->SetBounds(layer_size); - texture_layer_impl->SetContentBounds(layer_size); texture_layer_impl->SetDrawsContent(true); texture_layer_impl->SetTextureMailbox( texture_mailbox, diff --git a/cc/layers/ui_resource_layer_impl_unittest.cc b/cc/layers/ui_resource_layer_impl_unittest.cc index c093a86..dfb17eb 100644 --- a/cc/layers/ui_resource_layer_impl_unittest.cc +++ b/cc/layers/ui_resource_layer_impl_unittest.cc @@ -33,7 +33,6 @@ scoped_ptr<UIResourceLayerImpl> GenerateUIResourceLayer( UIResourceLayerImpl::Create(host_impl->active_tree(), 1); layer->draw_properties().visible_content_rect = visible_content_rect; layer->SetBounds(layer_size); - layer->SetContentBounds(layer_size); layer->SetHasRenderSurface(true); layer->draw_properties().render_target = layer.get(); @@ -174,7 +173,6 @@ TEST(UIResourceLayerImplTest, Occlusion) { UIResourceLayerImpl* ui_resource_layer_impl = impl.AddChildToRoot<UIResourceLayerImpl>(); ui_resource_layer_impl->SetBounds(layer_size); - ui_resource_layer_impl->SetContentBounds(layer_size); ui_resource_layer_impl->SetDrawsContent(true); ui_resource_layer_impl->SetUIResourceId(uid); diff --git a/cc/layers/video_frame_provider_client_impl_unittest.cc b/cc/layers/video_frame_provider_client_impl_unittest.cc index f2f2c0d..05385e4 100644 --- a/cc/layers/video_frame_provider_client_impl_unittest.cc +++ b/cc/layers/video_frame_provider_client_impl_unittest.cc @@ -76,7 +76,6 @@ class VideoFrameProviderClientImplTest : public testing::Test, video_layer_impl_ = impl_.AddChildToRoot<VideoLayerImpl>( &provider_, media::VIDEO_ROTATION_0); video_layer_impl_->SetBounds(layer_size); - video_layer_impl_->SetContentBounds(layer_size); video_layer_impl_->SetDrawsContent(true); client_impl_->SetActiveVideoLayer(video_layer_impl_); ASSERT_TRUE(client_impl_->ActiveVideoLayer()); diff --git a/cc/layers/video_layer_impl_unittest.cc b/cc/layers/video_layer_impl_unittest.cc index 35a07df..5f580d1 100644 --- a/cc/layers/video_layer_impl_unittest.cc +++ b/cc/layers/video_layer_impl_unittest.cc @@ -47,7 +47,6 @@ TEST(VideoLayerImplTest, Occlusion) { VideoLayerImpl* video_layer_impl = impl.AddChildToRoot<VideoLayerImpl>(&provider, media::VIDEO_ROTATION_0); video_layer_impl->SetBounds(layer_size); - video_layer_impl->SetContentBounds(layer_size); video_layer_impl->SetDrawsContent(true); impl.CalcDrawProps(viewport_size); @@ -98,7 +97,6 @@ TEST(VideoLayerImplTest, OccludesOtherLayers) { scoped_ptr<LayerImpl> layer_impl = LayerImpl::Create(active_tree, 3); layer_impl->SetHasRenderSurface(true); layer_impl->SetBounds(layer_size); - layer_impl->SetContentBounds(layer_size); layer_impl->SetDrawsContent(true); const auto& draw_properties = layer_impl->draw_properties(); @@ -106,7 +104,6 @@ TEST(VideoLayerImplTest, OccludesOtherLayers) { scoped_ptr<VideoLayerImpl> video_layer_impl = VideoLayerImpl::Create( active_tree, 4, &provider, media::VIDEO_ROTATION_0); video_layer_impl->SetBounds(layer_size); - video_layer_impl->SetContentBounds(layer_size); video_layer_impl->SetDrawsContent(true); video_layer_impl->SetContentsOpaque(true); @@ -167,7 +164,6 @@ TEST(VideoLayerImplTest, Rotated0) { VideoLayerImpl* video_layer_impl = impl.AddChildToRoot<VideoLayerImpl>(&provider, media::VIDEO_ROTATION_0); video_layer_impl->SetBounds(layer_size); - video_layer_impl->SetContentBounds(layer_size); video_layer_impl->SetDrawsContent(true); impl.CalcDrawProps(viewport_size); @@ -207,7 +203,6 @@ TEST(VideoLayerImplTest, Rotated90) { VideoLayerImpl* video_layer_impl = impl.AddChildToRoot<VideoLayerImpl>(&provider, media::VIDEO_ROTATION_90); video_layer_impl->SetBounds(layer_size); - video_layer_impl->SetContentBounds(layer_size); video_layer_impl->SetDrawsContent(true); impl.CalcDrawProps(viewport_size); @@ -247,7 +242,6 @@ TEST(VideoLayerImplTest, Rotated180) { VideoLayerImpl* video_layer_impl = impl.AddChildToRoot<VideoLayerImpl>(&provider, media::VIDEO_ROTATION_180); video_layer_impl->SetBounds(layer_size); - video_layer_impl->SetContentBounds(layer_size); video_layer_impl->SetDrawsContent(true); impl.CalcDrawProps(viewport_size); @@ -287,7 +281,6 @@ TEST(VideoLayerImplTest, Rotated270) { VideoLayerImpl* video_layer_impl = impl.AddChildToRoot<VideoLayerImpl>(&provider, media::VIDEO_ROTATION_270); video_layer_impl->SetBounds(layer_size); - video_layer_impl->SetContentBounds(layer_size); video_layer_impl->SetDrawsContent(true); impl.CalcDrawProps(viewport_size); @@ -331,7 +324,6 @@ TEST(VideoLayerImplTest, SoftwareVideoFrameGeneratesYUVQuad) { VideoLayerImpl* video_layer_impl = impl.AddChildToRoot<VideoLayerImpl>(&provider, media::VIDEO_ROTATION_0); video_layer_impl->SetBounds(layer_size); - video_layer_impl->SetContentBounds(layer_size); video_layer_impl->SetDrawsContent(true); gfx::Rect occluded; @@ -372,7 +364,6 @@ TEST(VideoLayerImplTest, NativeYUVFrameGeneratesYUVQuad) { VideoLayerImpl* video_layer_impl = impl.AddChildToRoot<VideoLayerImpl>(&provider, media::VIDEO_ROTATION_0); video_layer_impl->SetBounds(layer_size); - video_layer_impl->SetContentBounds(layer_size); video_layer_impl->SetDrawsContent(true); gfx::Rect occluded; diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc index 11d1320..93cfbc2 100644 --- a/cc/test/fake_picture_layer_impl.cc +++ b/cc/test/fake_picture_layer_impl.cc @@ -25,7 +25,6 @@ FakePictureLayerImpl::FakePictureLayerImpl( use_set_valid_tile_priorities_flag_(false), release_resources_count_(0) { SetBounds(raster_source->GetSize()); - SetContentBounds(raster_source->GetSize()); SetRasterSourceOnPending(raster_source, Region()); } @@ -45,7 +44,6 @@ FakePictureLayerImpl::FakePictureLayerImpl( use_set_valid_tile_priorities_flag_(false), release_resources_count_(0) { SetBounds(layer_bounds); - SetContentBounds(layer_bounds); SetRasterSourceOnPending(raster_source, Region()); } diff --git a/cc/test/layer_tree_host_common_test.cc b/cc/test/layer_tree_host_common_test.cc index 918e7c3..d266f5d 100644 --- a/cc/test/layer_tree_host_common_test.cc +++ b/cc/test/layer_tree_host_common_test.cc @@ -48,8 +48,6 @@ void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( if (create_render_surface) { layer->SetHasRenderSurface(true); } - - layer->SetContentBounds(bounds); } void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( diff --git a/cc/trees/damage_tracker_unittest.cc b/cc/trees/damage_tracker_unittest.cc index 9727759..831b1f7 100644 --- a/cc/trees/damage_tracker_unittest.cc +++ b/cc/trees/damage_tracker_unittest.cc @@ -89,14 +89,12 @@ class DamageTrackerTest : public testing::Test { root->SetPosition(gfx::PointF()); root->SetBounds(gfx::Size(500, 500)); - root->SetContentBounds(gfx::Size(500, 500)); root->SetDrawsContent(true); root->SetHasRenderSurface(true); root->render_surface()->SetContentRect(gfx::Rect(0, 0, 500, 500)); child->SetPosition(gfx::PointF(100.f, 100.f)); child->SetBounds(gfx::Size(30, 30)); - child->SetContentBounds(gfx::Size(30, 30)); child->SetDrawsContent(true); root->AddChild(child.Pass()); @@ -121,14 +119,12 @@ class DamageTrackerTest : public testing::Test { root->SetPosition(gfx::PointF()); root->SetBounds(gfx::Size(500, 500)); - root->SetContentBounds(gfx::Size(500, 500)); root->SetDrawsContent(true); root->SetHasRenderSurface(true); root->render_surface()->SetContentRect(gfx::Rect(0, 0, 500, 500)); child1->SetPosition(gfx::PointF(100.f, 100.f)); child1->SetBounds(gfx::Size(30, 30)); - child1->SetContentBounds(gfx::Size(30, 30)); // With a child that draws_content, opacity will cause the layer to create // its own RenderSurface. This layer does not draw, but is intended to // create its own RenderSurface. @@ -137,17 +133,14 @@ class DamageTrackerTest : public testing::Test { child2->SetPosition(gfx::PointF(11.f, 11.f)); child2->SetBounds(gfx::Size(18, 18)); - child2->SetContentBounds(gfx::Size(18, 18)); child2->SetDrawsContent(true); grand_child1->SetPosition(gfx::PointF(200.f, 200.f)); grand_child1->SetBounds(gfx::Size(6, 8)); - grand_child1->SetContentBounds(gfx::Size(6, 8)); grand_child1->SetDrawsContent(true); grand_child2->SetPosition(gfx::PointF(190.f, 190.f)); grand_child2->SetBounds(gfx::Size(6, 8)); - grand_child2->SetContentBounds(gfx::Size(6, 8)); grand_child2->SetDrawsContent(true); child1->AddChild(grand_child1.Pass()); @@ -472,7 +465,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForPerspectiveClippedLayer) { // Set up the child child->SetPosition(gfx::PointF(0.f, 0.f)); child->SetBounds(gfx::Size(100, 100)); - child->SetContentBounds(gfx::Size(100, 100)); child->SetTransform(transform); EmulateDrawingOneFrame(root.get()); @@ -710,7 +702,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForAddingAndRemovingLayer) { LayerImpl::Create(host_impl_.active_tree(), 3); child2->SetPosition(gfx::PointF(400.f, 380.f)); child2->SetBounds(gfx::Size(6, 8)); - child2->SetContentBounds(gfx::Size(6, 8)); child2->SetDrawsContent(true); root->AddChild(child2.Pass()); } @@ -759,7 +750,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForNewUnchangedLayer) { LayerImpl::Create(host_impl_.active_tree(), 3); child2->SetPosition(gfx::PointF(400.f, 380.f)); child2->SetBounds(gfx::Size(6, 8)); - child2->SetContentBounds(gfx::Size(6, 8)); child2->SetDrawsContent(true); child2->ResetAllChangeTrackingForSubtree(); // Sanity check the initial conditions of the test, if these asserts @@ -792,7 +782,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForMultipleLayers) { LayerImpl::Create(host_impl_.active_tree(), 3); child2->SetPosition(gfx::PointF(400.f, 380.f)); child2->SetBounds(gfx::Size(6, 8)); - child2->SetContentBounds(gfx::Size(6, 8)); child2->SetDrawsContent(true); root->AddChild(child2.Pass()); } @@ -1042,7 +1031,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplica) { LayerImpl::Create(host_impl_.active_tree(), 6); grand_child3->SetPosition(gfx::PointF(240.f, 240.f)); grand_child3->SetBounds(gfx::Size(10, 10)); - grand_child3->SetContentBounds(gfx::Size(10, 10)); grand_child3->SetDrawsContent(true); child1->AddChild(grand_child3.Pass()); } @@ -1144,7 +1132,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForMask) { LayerImpl::Create(host_impl_.active_tree(), 3); mask_layer->SetPosition(child->position()); mask_layer->SetBounds(child->bounds()); - mask_layer->SetContentBounds(child->bounds()); child->SetMaskLayer(mask_layer.Pass()); child->SetHasRenderSurface(true); } @@ -1157,7 +1144,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForMask) { LayerImpl::Create(host_impl_.active_tree(), 4); grand_child->SetPosition(gfx::PointF(2.f, 2.f)); grand_child->SetBounds(gfx::Size(2, 2)); - grand_child->SetContentBounds(gfx::Size(2, 2)); grand_child->SetDrawsContent(true); child->AddChild(grand_child.Pass()); } @@ -1246,7 +1232,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMask) { LayerImpl::Create(host_impl_.active_tree(), 7); replica_mask_layer->SetPosition(gfx::PointF()); replica_mask_layer->SetBounds(grand_child1->bounds()); - replica_mask_layer->SetContentBounds(grand_child1->bounds()); grand_child1_replica->SetMaskLayer(replica_mask_layer.Pass()); } LayerImpl* replica_mask_layer = grand_child1_replica->mask_layer(); @@ -1325,7 +1310,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMaskWithTransformOrigin) { replica_mask_layer->SetPosition(gfx::PointF()); // Note: this is not the transform origin being tested. replica_mask_layer->SetBounds(grand_child1->bounds()); - replica_mask_layer->SetContentBounds(grand_child1->bounds()); grand_child1_replica->SetMaskLayer(replica_mask_layer.Pass()); } LayerImpl* replica_mask_layer = grand_child1_replica->mask_layer(); @@ -1459,7 +1443,6 @@ TEST_F(DamageTrackerTest, HugeDamageRect) { // but has a huge negative position. child->SetPosition(gfx::PointF()); child->SetBounds(gfx::Size(kBigNumber + i, kBigNumber + i)); - child->SetContentBounds(gfx::Size(kBigNumber + i, kBigNumber + i)); child->SetTransform(transform); EmulateDrawingOneFrame(root.get()); diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc index 2fc2f6e..8954850 100644 --- a/cc/trees/layer_tree_host_common_unittest.cc +++ b/cc/trees/layer_tree_host_common_unittest.cc @@ -7962,8 +7962,6 @@ TEST_F(LayerTreeHostCommonTest, BoundsDeltaAffectVisibleContentRect) { false, false, true); - - root->SetContentBounds(root_size); root->SetMasksToBounds(true); root->AddChild(LayerImpl::Create(host_impl.active_tree(), 2)); @@ -7977,8 +7975,6 @@ TEST_F(LayerTreeHostCommonTest, BoundsDeltaAffectVisibleContentRect) { false, false, false); - - sublayer->SetContentBounds(sublayer_size); sublayer->SetDrawsContent(true); LayerImplList layer_impl_list; diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index 0dfcd01..ce65628c 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -187,7 +187,6 @@ class LayerTreeHostImplTest : public testing::Test, void SetupRootLayerImpl(scoped_ptr<LayerImpl> root) { root->SetPosition(gfx::PointF()); root->SetBounds(gfx::Size(10, 10)); - root->SetContentBounds(gfx::Size(10, 10)); root->SetDrawsContent(true); root->draw_properties().visible_content_rect = gfx::Rect(0, 0, 10, 10); root->SetHasRenderSurface(true); @@ -242,7 +241,6 @@ class LayerTreeHostImplTest : public testing::Test, scoped_ptr<LayerImpl> root = LayerImpl::Create(layer_tree_impl, 1); root->SetBounds(content_size); - root->SetContentBounds(content_size); root->SetPosition(gfx::PointF()); root->SetHasRenderSurface(true); @@ -261,7 +259,6 @@ class LayerTreeHostImplTest : public testing::Test, inner_scroll->SetScrollClipLayer(inner_clip->id()); inner_scroll->SetBounds(content_size); - inner_scroll->SetContentBounds(content_size); inner_scroll->SetPosition(gfx::PointF()); scoped_ptr<LayerImpl> outer_clip = @@ -274,14 +271,12 @@ class LayerTreeHostImplTest : public testing::Test, outer_scroll->SetScrollClipLayer(outer_clip->id()); outer_scroll->PushScrollOffsetFromMainThread(gfx::ScrollOffset()); outer_scroll->SetBounds(content_size); - outer_scroll->SetContentBounds(content_size); outer_scroll->SetPosition(gfx::PointF()); scoped_ptr<LayerImpl> contents = LayerImpl::Create(layer_tree_impl, kContentLayerId); contents->SetDrawsContent(true); contents->SetBounds(content_size); - contents->SetContentBounds(content_size); contents->SetPosition(gfx::PointF()); outer_scroll->AddChild(contents.Pass()); @@ -318,7 +313,6 @@ class LayerTreeHostImplTest : public testing::Test, layer->SetScrollClipLayer(clip_layer->id()); layer->SetDrawsContent(true); layer->SetBounds(size); - layer->SetContentBounds(size); clip_layer->SetBounds(gfx::Size(size.width() / 2, size.height() / 2)); return layer.Pass(); } @@ -646,7 +640,6 @@ TEST_F(LayerTreeHostImplTest, ScrollBlocksOnTouchEventHandlers) { child_layer->SetDrawsContent(true); child_layer->SetPosition(gfx::PointF(0, 20)); child_layer->SetBounds(gfx::Size(50, 50)); - child_layer->SetContentBounds(gfx::Size(50, 50)); scroll->AddChild(child_layer.Pass()); } @@ -1020,7 +1013,6 @@ TEST_F(LayerTreeHostImplTest, ScrollWithUserUnscrollableLayers) { ASSERT_EQ(1u, scroll_layer->children().size()); LayerImpl* overflow = scroll_layer->children()[0]; overflow->SetBounds(overflow_size); - overflow->SetContentBounds(overflow_size); overflow->SetScrollClipLayer(scroll_layer->parent()->id()); overflow->PushScrollOffsetFromMainThread(gfx::ScrollOffset()); overflow->SetPosition(gfx::PointF()); @@ -1148,11 +1140,8 @@ TEST_F(LayerTreeHostImplTest, ScrollDuringPinchScrollsInnerViewport) { LayerImpl* inner_clip_layer = host_impl_->InnerViewportScrollLayer()->parent()->parent(); inner_clip_layer->SetBounds(gfx::Size(100, 100)); - inner_clip_layer->SetContentBounds(gfx::Size(100, 100)); outer_scroll_layer->SetBounds(gfx::Size(200, 200)); - outer_scroll_layer->SetContentBounds(gfx::Size(200, 200)); content_layer->SetBounds(gfx::Size(200, 200)); - content_layer->SetContentBounds(gfx::Size(200, 200)); host_impl_->SetViewportSize(gfx::Size(100, 100)); @@ -1187,11 +1176,8 @@ TEST_F(LayerTreeHostImplTest, ImplPinchZoomWheelBubbleBetweenViewports) { LayerImpl* inner_clip_layer = host_impl_->InnerViewportScrollLayer()->parent()->parent(); inner_clip_layer->SetBounds(gfx::Size(100, 100)); - inner_clip_layer->SetContentBounds(gfx::Size(100, 100)); outer_scroll_layer->SetBounds(gfx::Size(200, 200)); - outer_scroll_layer->SetContentBounds(gfx::Size(200, 200)); content_layer->SetBounds(gfx::Size(200, 200)); - content_layer->SetContentBounds(gfx::Size(200, 200)); host_impl_->SetViewportSize(gfx::Size(100, 100)); @@ -1807,14 +1793,12 @@ class LayerTreeHostImplTestScrollbarAnimation : public LayerTreeHostImplTest { scroll->PushScrollOffsetFromMainThread(gfx::ScrollOffset()); root->SetBounds(viewport_size); scroll->SetBounds(content_size); - scroll->SetContentBounds(content_size); scroll->SetIsContainerForFixedPositionLayers(true); scoped_ptr<LayerImpl> contents = LayerImpl::Create(host_impl_->active_tree(), 3); contents->SetDrawsContent(true); contents->SetBounds(content_size); - contents->SetContentBounds(content_size); scoped_ptr<SolidColorScrollbarLayerImpl> scrollbar = SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(), 4, @@ -1965,21 +1949,18 @@ void LayerTreeHostImplTest::SetupMouseMoveAtWithDeviceScale( scroll->SetScrollClipLayer(root->id()); scroll->PushScrollOffsetFromMainThread(gfx::ScrollOffset()); scroll->SetBounds(content_size); - scroll->SetContentBounds(content_size); scroll->SetIsContainerForFixedPositionLayers(true); scoped_ptr<LayerImpl> contents = LayerImpl::Create(host_impl_->active_tree(), 3); contents->SetDrawsContent(true); contents->SetBounds(content_size); - contents->SetContentBounds(content_size); // The scrollbar is on the right side. scoped_ptr<PaintedScrollbarLayerImpl> scrollbar = PaintedScrollbarLayerImpl::Create(host_impl_->active_tree(), 5, VERTICAL); scrollbar->SetDrawsContent(true); scrollbar->SetBounds(gfx::Size(15, viewport_size.height())); - scrollbar->SetContentBounds(gfx::Size(15, viewport_size.height())); scrollbar->SetPosition(gfx::Point(285, 0)); scroll->AddChild(contents.Pass()); @@ -2172,7 +2153,6 @@ class DidDrawCheckLayer : public LayerImpl { append_quads_called_(false), did_draw_called_(false) { SetBounds(gfx::Size(10, 10)); - SetContentBounds(gfx::Size(10, 10)); SetDrawsContent(true); draw_properties().visible_content_rect = gfx::Rect(0, 0, 10, 10); } @@ -2241,7 +2221,6 @@ TEST_F(LayerTreeHostImplTest, DidDrawNotCalledOnHiddenLayer) { // Ensure visible_content_rect for layer is empty. layer->SetPosition(gfx::PointF(100.f, 100.f)); layer->SetBounds(gfx::Size(10, 10)); - layer->SetContentBounds(gfx::Size(10, 10)); LayerTreeHostImpl::FrameData frame; @@ -2293,7 +2272,6 @@ TEST_F(LayerTreeHostImplTest, WillDrawNotCalledOnOccludedLayer) { // This layer covers the occluded_layer above. Make this layer large so it can // occlude. top_layer->SetBounds(big_size); - top_layer->SetContentBounds(big_size); top_layer->SetContentsOpaque(true); LayerTreeHostImpl::FrameData frame; @@ -2676,7 +2654,6 @@ class LayerTreeHostImplTopControlsTest : public LayerTreeHostImplTest { root_clip->SetBounds(clip_size_); root->SetScrollClipLayer(root_clip->id()); root->SetBounds(layer_size_); - root->SetContentBounds(layer_size_); root->SetPosition(gfx::PointF()); root->SetDrawsContent(false); root->SetIsContainerForFixedPositionLayers(true); @@ -2705,7 +2682,6 @@ class LayerTreeHostImplTopControlsTest : public LayerTreeHostImplTest { root_clip->SetBounds(clip_size_); root->SetScrollClipLayer(root_clip->id()); root->SetBounds(layer_size_); - root->SetContentBounds(layer_size_); root->SetPosition(gfx::PointF()); root->SetDrawsContent(false); root->SetIsContainerForFixedPositionLayers(true); @@ -2747,7 +2723,6 @@ class LayerTreeHostImplTopControlsTest : public LayerTreeHostImplTest { root_clip->SetBounds(inner_viewport_size); root->SetScrollClipLayer(root_clip->id()); root->SetBounds(outer_viewport_size); - root->SetContentBounds(outer_viewport_size); root->SetPosition(gfx::PointF()); root->SetDrawsContent(false); root->SetIsContainerForFixedPositionLayers(true); @@ -2755,7 +2730,6 @@ class LayerTreeHostImplTopControlsTest : public LayerTreeHostImplTest { outer_clip->SetBounds(outer_viewport_size); outer_scroll->SetScrollClipLayer(outer_clip->id()); outer_scroll->SetBounds(scroll_layer_size); - outer_scroll->SetContentBounds(scroll_layer_size); outer_scroll->SetPosition(gfx::PointF()); outer_scroll->SetDrawsContent(false); outer_scroll->SetIsContainerForFixedPositionLayers(true); @@ -2960,7 +2934,6 @@ TEST_F(LayerTreeHostImplTopControlsTest, TopControlsScrollableSublayer) { child_clip->SetBounds(sub_content_layer_size); child->SetScrollClipLayer(child_clip->id()); child->SetBounds(sub_content_size); - child->SetContentBounds(sub_content_size); child->SetPosition(gfx::PointF()); child->SetDrawsContent(true); child->SetIsContainerForFixedPositionLayers(true); @@ -3316,7 +3289,6 @@ TEST_F(LayerTreeHostImplTest, ScrollNonCompositedRoot) { content_layer->SetDrawsContent(true); content_layer->SetPosition(gfx::PointF()); content_layer->SetBounds(contents_size); - content_layer->SetContentBounds(contents_size); content_layer->SetContentsScale(2.f, 2.f); scoped_ptr<LayerImpl> scroll_clip_layer = @@ -3327,7 +3299,6 @@ TEST_F(LayerTreeHostImplTest, ScrollNonCompositedRoot) { LayerImpl::Create(host_impl_->active_tree(), 2); scroll_layer->SetScrollClipLayer(3); scroll_layer->SetBounds(contents_size); - scroll_layer->SetContentBounds(contents_size); scroll_layer->SetPosition(gfx::PointF()); scroll_layer->AddChild(content_layer.Pass()); scroll_clip_layer->AddChild(scroll_layer.Pass()); @@ -3350,7 +3321,6 @@ TEST_F(LayerTreeHostImplTest, ScrollChildCallsCommitAndRedraw) { gfx::Size contents_size(20, 20); scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1); root->SetBounds(surface_size); - root->SetContentBounds(contents_size); root->AddChild(CreateScrollableLayer(2, contents_size, root.get())); root->SetHasRenderSurface(true); host_impl_->active_tree()->SetRootLayer(root.Pass()); @@ -3606,7 +3576,6 @@ TEST_F(LayerTreeHostImplTest, ScrollChildAndChangePageScaleOnMainThread) { scoped_ptr<LayerImpl> root_scrolling = LayerImpl::Create(host_impl_->active_tree(), 2); root_scrolling->SetBounds(surface_size); - root_scrolling->SetContentBounds(surface_size); root_scrolling->SetScrollClipLayer(root->id()); root_scrolling->SetIsContainerForFixedPositionLayers(true); LayerImpl* root_scrolling_ptr = root_scrolling.get(); @@ -4689,7 +4658,6 @@ class BlendStateCheckLayer : public LayerImpl { RGBA_8888)) { resource_provider->AllocateForTesting(resource_id_); SetBounds(gfx::Size(10, 10)); - SetContentBounds(gfx::Size(10, 10)); SetDrawsContent(true); } @@ -4707,7 +4675,6 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1); root->SetBounds(gfx::Size(10, 10)); - root->SetContentBounds(root->bounds()); root->SetDrawsContent(false); root->SetHasRenderSurface(true); host_impl_->active_tree()->SetRootLayer(root.Pass()); @@ -4964,7 +4931,6 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest { gfx::Rect layer_rect(viewport_size_); child_->SetPosition(layer_rect.origin()); child_->SetBounds(layer_rect.size()); - child_->SetContentBounds(layer_rect.size()); child_->SetQuadRect(gfx::Rect(layer_rect.size())); child_->SetQuadVisibleRect(gfx::Rect(layer_rect.size())); @@ -4985,7 +4951,6 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest { gfx::Rect layer_rect(0, 0, 0, 0); child_->SetPosition(layer_rect.origin()); child_->SetBounds(layer_rect.size()); - child_->SetContentBounds(layer_rect.size()); child_->SetQuadRect(gfx::Rect(layer_rect.size())); child_->SetQuadVisibleRect(gfx::Rect(layer_rect.size())); @@ -5006,7 +4971,6 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest { gfx::Rect layer_rect(500, 500, 200, 200); child_->SetPosition(layer_rect.origin()); child_->SetBounds(layer_rect.size()); - child_->SetContentBounds(layer_rect.size()); child_->SetQuadRect(gfx::Rect(layer_rect.size())); child_->SetQuadVisibleRect(gfx::Rect(layer_rect.size())); @@ -5028,7 +4992,6 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest { viewport_size_.height() + 10); child_->SetPosition(layer_rect.origin()); child_->SetBounds(layer_rect.size()); - child_->SetContentBounds(layer_rect.size()); child_->SetQuadRect(gfx::Rect(layer_rect.size())); child_->SetQuadVisibleRect(gfx::Rect(layer_rect.size())); @@ -5194,7 +5157,6 @@ TEST_F(LayerTreeHostImplTest, ReshapeNotCalledUntilDraw) { scoped_ptr<LayerImpl> root = FakeDrawableLayerImpl::Create(host_impl_->active_tree(), 1); root->SetBounds(gfx::Size(10, 10)); - root->SetContentBounds(gfx::Size(10, 10)); root->SetDrawsContent(true); root->SetHasRenderSurface(true); host_impl_->active_tree()->SetRootLayer(root.Pass()); @@ -5266,10 +5228,8 @@ TEST_F(LayerTreeHostImplTest, PartialSwapReceivesDamageRect) { FakeDrawableLayerImpl::Create(layer_tree_host_impl->active_tree(), 2); child->SetPosition(gfx::PointF(12.f, 13.f)); child->SetBounds(gfx::Size(14, 15)); - child->SetContentBounds(gfx::Size(14, 15)); child->SetDrawsContent(true); root->SetBounds(gfx::Size(500, 500)); - root->SetContentBounds(gfx::Size(500, 500)); root->SetDrawsContent(true); root->AddChild(child.Pass()); layer_tree_host_impl->active_tree()->SetRootLayer(root.Pass()); @@ -5323,10 +5283,8 @@ TEST_F(LayerTreeHostImplTest, RootLayerDoesntCreateExtraSurface) { scoped_ptr<LayerImpl> child = FakeDrawableLayerImpl::Create(host_impl_->active_tree(), 2); child->SetBounds(gfx::Size(10, 10)); - child->SetContentBounds(gfx::Size(10, 10)); child->SetDrawsContent(true); root->SetBounds(gfx::Size(10, 10)); - root->SetContentBounds(gfx::Size(10, 10)); root->SetDrawsContent(true); root->SetHasRenderSurface(true); root->AddChild(child.Pass()); @@ -5583,7 +5541,6 @@ static scoped_ptr<LayerTreeHostImpl> SetupLayersForOpacity( root->SetHasRenderSurface(true); root->SetPosition(root_rect.origin()); root->SetBounds(root_rect.size()); - root->SetContentBounds(root->bounds()); root->draw_properties().visible_content_rect = root_rect; root->SetDrawsContent(false); root->render_surface()->SetContentRect(gfx::Rect(root_rect.size())); @@ -5591,14 +5548,12 @@ static scoped_ptr<LayerTreeHostImpl> SetupLayersForOpacity( child->SetPosition(gfx::PointF(child_rect.x(), child_rect.y())); child->SetOpacity(0.5f); child->SetBounds(gfx::Size(child_rect.width(), child_rect.height())); - child->SetContentBounds(child->bounds()); child->draw_properties().visible_content_rect = child_rect; child->SetDrawsContent(false); child->SetHasRenderSurface(true); grand_child->SetPosition(grand_child_rect.origin()); grand_child->SetBounds(grand_child_rect.size()); - grand_child->SetContentBounds(grand_child->bounds()); grand_child->draw_properties().visible_content_rect = grand_child_rect; grand_child->SetDrawsContent(true); @@ -5678,14 +5633,12 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) { scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( host_impl_->active_tree(), 4, &provider, media::VIDEO_ROTATION_0); video_layer->SetBounds(gfx::Size(10, 10)); - video_layer->SetContentBounds(gfx::Size(10, 10)); video_layer->SetDrawsContent(true); root_layer->AddChild(video_layer.Pass()); scoped_ptr<IOSurfaceLayerImpl> io_surface_layer = IOSurfaceLayerImpl::Create(host_impl_->active_tree(), 5); io_surface_layer->SetBounds(gfx::Size(10, 10)); - io_surface_layer->SetContentBounds(gfx::Size(10, 10)); io_surface_layer->SetDrawsContent(true); io_surface_layer->SetIOSurfaceProperties(1, gfx::Size(10, 10)); root_layer->AddChild(io_surface_layer.Pass()); @@ -5841,7 +5794,6 @@ TEST_F(LayerTreeHostImplTestWithDelegatingRenderer, FrameIncludesDamageRect) { SolidColorLayerImpl::Create(host_impl_->active_tree(), 1); root->SetPosition(gfx::PointF()); root->SetBounds(gfx::Size(10, 10)); - root->SetContentBounds(gfx::Size(10, 10)); root->SetDrawsContent(true); root->SetHasRenderSurface(true); @@ -5850,7 +5802,6 @@ TEST_F(LayerTreeHostImplTestWithDelegatingRenderer, FrameIncludesDamageRect) { SolidColorLayerImpl::Create(host_impl_->active_tree(), 2); child->SetPosition(gfx::PointF(9.f, 9.f)); child->SetBounds(gfx::Size(1, 1)); - child->SetContentBounds(gfx::Size(1, 1)); child->SetDrawsContent(true); root->AddChild(child.Pass()); @@ -6079,7 +6030,6 @@ TEST_F(LayerTreeHostImplTest, scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( host_impl_->active_tree(), 2, &provider, media::VIDEO_ROTATION_0); video_layer->SetBounds(gfx::Size(10, 10)); - video_layer->SetContentBounds(gfx::Size(10, 10)); video_layer->SetDrawsContent(true); root_layer->AddChild(video_layer.Pass()); SetupRootLayerImpl(root_layer.Pass()); @@ -6504,7 +6454,6 @@ TEST_F(LayerTreeHostImplTest, ScrollUnknownNotOnAncestorChain) { LayerImpl::Create(host_impl_->active_tree(), occluder_layer_id); occluder_layer->SetDrawsContent(true); occluder_layer->SetBounds(content_size); - occluder_layer->SetContentBounds(content_size); occluder_layer->SetPosition(gfx::PointF()); // The parent of the occluder is *above* the scroller. @@ -6533,7 +6482,6 @@ TEST_F(LayerTreeHostImplTest, ScrollUnknownScrollAncestorMismatch) { LayerImpl::Create(host_impl_->active_tree(), occluder_layer_id); occluder_layer->SetDrawsContent(true); occluder_layer->SetBounds(content_size); - occluder_layer->SetContentBounds(content_size); occluder_layer->SetPosition(gfx::PointF(-10.f, -10.f)); int child_scroll_clip_layer_id = 7; @@ -6605,7 +6553,6 @@ TEST_F(LayerTreeHostImplTest, ScrollInvisibleScrollerWithVisibleDescendent) { LayerImpl::Create(host_impl_->active_tree(), 9); grand_child_layer->SetDrawsContent(true); grand_child_layer->SetBounds(content_size); - grand_child_layer->SetContentBounds(content_size); // Move the grand child so it's not hit by our test point. grand_child_layer->SetPosition(gfx::PointF(10.f, 10.f)); @@ -6642,7 +6589,6 @@ TEST_F(LayerTreeHostImplTest, ScrollInvisibleScrollerWithVisibleScrollChild) { LayerImpl::Create(host_impl_->active_tree(), scroll_child_id); scroll_child->SetDrawsContent(true); scroll_child->SetBounds(content_size); - scroll_child->SetContentBounds(content_size); // Move the scroll child so it's not hit by our test point. scroll_child->SetPosition(gfx::PointF(10.f, 10.f)); @@ -6684,7 +6630,6 @@ TEST_F(LayerTreeHostImplTest, LatencyInfoPassedToCompositorFrameMetadata) { SolidColorLayerImpl::Create(host_impl_->active_tree(), 1); root->SetPosition(gfx::PointF()); root->SetBounds(gfx::Size(10, 10)); - root->SetContentBounds(gfx::Size(10, 10)); root->SetDrawsContent(true); root->SetHasRenderSurface(true); @@ -6725,7 +6670,6 @@ TEST_F(LayerTreeHostImplTest, SelectionBoundsPassedToCompositorFrameMetadata) { SolidColorLayerImpl::Create(host_impl_->active_tree(), root_layer_id); root->SetPosition(gfx::PointF()); root->SetBounds(gfx::Size(10, 10)); - root->SetContentBounds(gfx::Size(10, 10)); root->SetDrawsContent(true); root->SetHasRenderSurface(true); @@ -7286,7 +7230,6 @@ class LayerTreeHostImplVirtualViewportTest : public LayerTreeHostImplTest { inner_scroll->SetScrollClipLayer(inner_clip->id()); inner_scroll->SetBounds(outer_viewport); - inner_scroll->SetContentBounds(outer_viewport); inner_scroll->SetPosition(gfx::PointF()); scoped_ptr<LayerImpl> outer_clip = @@ -7299,14 +7242,12 @@ class LayerTreeHostImplVirtualViewportTest : public LayerTreeHostImplTest { outer_scroll->SetScrollClipLayer(outer_clip->id()); outer_scroll->PushScrollOffsetFromMainThread(gfx::ScrollOffset()); outer_scroll->SetBounds(content_size); - outer_scroll->SetContentBounds(content_size); outer_scroll->SetPosition(gfx::PointF()); scoped_ptr<LayerImpl> contents = LayerImpl::Create(layer_tree_impl, 8); contents->SetDrawsContent(true); contents->SetBounds(content_size); - contents->SetContentBounds(content_size); contents->SetPosition(gfx::PointF()); outer_scroll->AddChild(contents.Pass()); diff --git a/cc/trees/occlusion_tracker_perftest.cc b/cc/trees/occlusion_tracker_perftest.cc index b4303e5..78468eb 100644 --- a/cc/trees/occlusion_tracker_perftest.cc +++ b/cc/trees/occlusion_tracker_perftest.cc @@ -86,7 +86,6 @@ TEST_F(OcclusionTrackerPerfTest, UnoccludedContentRect_FullyOccluded) { opaque_layer->SetContentsOpaque(true); opaque_layer->SetDrawsContent(true); opaque_layer->SetBounds(viewport_rect.size()); - opaque_layer->SetContentBounds(viewport_rect.size()); active_tree()->root_layer()->AddChild(opaque_layer.Pass()); bool update_lcd_text = false; @@ -155,8 +154,6 @@ TEST_F(OcclusionTrackerPerfTest, UnoccludedContentRect_10OpaqueLayers) { opaque_layer->SetDrawsContent(true); opaque_layer->SetBounds( gfx::Size(viewport_rect.width() / 2, viewport_rect.height() / 2)); - opaque_layer->SetContentBounds( - gfx::Size(viewport_rect.width() / 2, viewport_rect.height() / 2)); opaque_layer->SetPosition(gfx::Point(i, i)); active_tree()->root_layer()->AddChild(opaque_layer.Pass()); } diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc index 6550d42..8183cea 100644 --- a/cc/trees/occlusion_tracker_unittest.cc +++ b/cc/trees/occlusion_tracker_unittest.cc @@ -287,22 +287,13 @@ class OcclusionTrackerTest : public testing::Test { void SetRootLayerOnMainThread(LayerImpl* root) {} - void SetBaseProperties(LayerImpl* layer, - const gfx::Transform& transform, - const gfx::PointF& position, - const gfx::Size& bounds) { - layer->SetTransform(transform); - layer->SetPosition(position); - layer->SetBounds(bounds); - } - void SetProperties(LayerImpl* layer, const gfx::Transform& transform, const gfx::PointF& position, const gfx::Size& bounds) { - SetBaseProperties(layer, transform, position, bounds); - - layer->SetContentBounds(layer->bounds()); + layer->SetTransform(transform); + layer->SetPosition(position); + layer->SetBounds(bounds); } void SetReplica(LayerImpl* owning_layer, scoped_ptr<LayerImpl> layer) { |