diff options
Diffstat (limited to 'cc/trees/layer_tree_host_impl_unittest.cc')
-rw-r--r-- | cc/trees/layer_tree_host_impl_unittest.cc | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index e814e70..0dfcd01 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -3932,7 +3932,7 @@ TEST_F(LayerTreeHostImplTest, ScrollNonAxisAlignedRotatedLayer) { scoped_ptr<LayerImpl> clip_layer = LayerImpl::Create(host_impl_->active_tree(), child_clip_layer_id); scoped_ptr<LayerImpl> child = CreateScrollableLayer( - child_layer_id, scroll_layer->content_bounds(), clip_layer.get()); + child_layer_id, scroll_layer->bounds(), clip_layer.get()); gfx::Transform rotate_transform; rotate_transform.Translate(-50.0, -50.0); rotate_transform.Rotate(child_layer_angle); @@ -4727,7 +4727,7 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { // Opaque layer, drawn without blending. layer1->SetContentsOpaque(true); layer1->SetExpectation(false, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4736,7 +4736,7 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { // Layer with translucent content and painting, so drawn with blending. layer1->SetContentsOpaque(false); layer1->SetExpectation(true, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4746,7 +4746,7 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetContentsOpaque(true); layer1->SetOpacity(0.5f); layer1->SetExpectation(true, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4756,7 +4756,7 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetContentsOpaque(true); layer1->SetOpacity(0.5f); layer1->SetExpectation(true, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4774,11 +4774,11 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetContentsOpaque(true); layer1->SetOpacity(1.f); layer1->SetExpectation(false, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); layer2->SetContentsOpaque(true); layer2->SetOpacity(1.f); layer2->SetExpectation(false, false); - layer2->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer2->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4789,9 +4789,9 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { // Child layer with opaque content, drawn without blending. layer1->SetContentsOpaque(false); layer1->SetExpectation(true, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); layer2->SetExpectation(false, false); - layer2->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer2->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4803,9 +4803,9 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { // Child layer with opaque content, drawn without blending. layer1->SetContentsOpaque(true); layer1->SetExpectation(false, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); layer2->SetExpectation(false, false); - layer2->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer2->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4821,9 +4821,9 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetOpacity(0.5f); layer1->SetHasRenderSurface(true); layer1->SetExpectation(false, true); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); layer2->SetExpectation(false, false); - layer2->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer2->SetUpdateRect(gfx::Rect(layer1->bounds())); FakeLayerTreeHostImpl::RecursiveUpdateNumChildren( host_impl_->active_tree()->root_layer()); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); @@ -4838,11 +4838,11 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetContentsOpaque(true); layer1->SetOpacity(1.f); layer1->SetExpectation(false, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); layer2->SetContentsOpaque(true); layer2->SetOpacity(0.5f); layer2->SetExpectation(true, false); - layer2->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer2->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4853,11 +4853,11 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetContentsOpaque(true); layer1->SetOpacity(1.f); layer1->SetExpectation(false, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); layer2->SetContentsOpaque(false); layer2->SetOpacity(1.f); layer2->SetExpectation(true, false); - layer2->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer2->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4869,11 +4869,11 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetContentsOpaque(true); layer1->SetOpacity(1.f); layer1->SetExpectation(false, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); layer2->SetContentsOpaque(true); layer2->SetOpacity(1.f); layer2->SetExpectation(false, false); - layer2->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer2->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4886,7 +4886,7 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetQuadVisibleRect(gfx::Rect(5, 5, 5, 5)); layer1->SetOpaqueContentRect(gfx::Rect(5, 5, 2, 5)); layer1->SetExpectation(true, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4898,7 +4898,7 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetQuadVisibleRect(gfx::Rect(5, 5, 5, 2)); layer1->SetOpaqueContentRect(gfx::Rect(5, 5, 2, 5)); layer1->SetExpectation(true, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4910,7 +4910,7 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetQuadVisibleRect(gfx::Rect(7, 5, 3, 5)); layer1->SetOpaqueContentRect(gfx::Rect(5, 5, 2, 5)); layer1->SetExpectation(true, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -4923,7 +4923,7 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { layer1->SetQuadVisibleRect(gfx::Rect(5, 5, 2, 5)); layer1->SetOpaqueContentRect(gfx::Rect(5, 5, 2, 5)); layer1->SetExpectation(false, false); - layer1->SetUpdateRect(gfx::Rect(layer1->content_bounds())); + layer1->SetUpdateRect(gfx::Rect(layer1->bounds())); EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); host_impl_->DrawLayers(&frame); EXPECT_TRUE(layer1->quads_appended()); @@ -5354,7 +5354,7 @@ class FakeLayerWithQuads : public LayerImpl { PopulateSharedQuadState(shared_quad_state); SkColor gray = SkColorSetRGB(100, 100, 100); - gfx::Rect quad_rect(content_bounds()); + gfx::Rect quad_rect(bounds()); gfx::Rect visible_quad_rect(quad_rect); SolidColorDrawQuad* my_quad = render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); @@ -5820,12 +5820,12 @@ class LayerTreeHostImplTestWithDelegatingRenderer ASSERT_EQ(2u, root_render_pass->quad_list.size()); LayerImpl* child = host_impl_->active_tree()->root_layer()->children()[0]; - gfx::RectF expected_child_visible_rect(child->content_bounds()); + gfx::RectF expected_child_visible_rect(child->bounds()); EXPECT_EQ(expected_child_visible_rect, root_render_pass->quad_list.front()->visible_rect); LayerImpl* root = host_impl_->active_tree()->root_layer(); - gfx::RectF expected_root_visible_rect(root->content_bounds()); + gfx::RectF expected_root_visible_rect(root->bounds()); EXPECT_EQ(expected_root_visible_rect, root_render_pass->quad_list.ElementAt(1)->visible_rect); } |