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

Unified Diff: cc/layers/delegated_renderer_layer_impl_unittest.cc

Issue 608503005: Revert of cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/layers/delegated_renderer_layer_impl.cc ('k') | cc/layers/heads_up_display_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/delegated_renderer_layer_impl_unittest.cc
diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc
index 832a483bf06d938561353c0e357a5ee127924e0f..d219f5af98534662f5de113fabeb1e54d94d21c1 100644
--- a/cc/layers/delegated_renderer_layer_impl_unittest.cc
+++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc
@@ -40,7 +40,8 @@
host_impl_.reset(
new FakeLayerTreeHostImpl(settings, &proxy_, &shared_bitmap_manager_));
- host_impl_->InitializeRenderer(FakeOutputSurface::Create3d());
+ host_impl_->InitializeRenderer(
+ FakeOutputSurface::Create3d().PassAs<OutputSurface>());
host_impl_->SetViewportSize(gfx::Size(10, 10));
}
@@ -57,12 +58,12 @@
public:
DelegatedRendererLayerImplTestSimple()
: DelegatedRendererLayerImplTest() {
- scoped_ptr<LayerImpl> root_layer =
- SolidColorLayerImpl::Create(host_impl_->active_tree(), 1);
- scoped_ptr<LayerImpl> layer_before =
- SolidColorLayerImpl::Create(host_impl_->active_tree(), 2);
- scoped_ptr<LayerImpl> layer_after =
- SolidColorLayerImpl::Create(host_impl_->active_tree(), 3);
+ scoped_ptr<LayerImpl> root_layer = SolidColorLayerImpl::Create(
+ host_impl_->active_tree(), 1).PassAs<LayerImpl>();
+ scoped_ptr<LayerImpl> layer_before = SolidColorLayerImpl::Create(
+ host_impl_->active_tree(), 2).PassAs<LayerImpl>();
+ scoped_ptr<LayerImpl> layer_after = SolidColorLayerImpl::Create(
+ host_impl_->active_tree(), 3).PassAs<LayerImpl>();
scoped_ptr<FakeDelegatedRendererLayerImpl> delegated_renderer_layer =
FakeDelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 4);
@@ -119,7 +120,7 @@
// Force the delegated RenderPasses to come before the RenderPass from
// layer_after.
- layer_after->AddChild(delegated_renderer_layer.Pass());
+ layer_after->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
root_layer->AddChild(layer_after.Pass());
// Get the RenderPass generated by layer_before to come before the delegated
@@ -632,7 +633,7 @@
root_layer_ = root_layer.get();
delegated_renderer_layer_ = delegated_renderer_layer.get();
- root_layer->AddChild(delegated_renderer_layer.Pass());
+ root_layer->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
host_impl_->active_tree()->SetRootLayer(root_layer.Pass());
}
@@ -1075,11 +1076,11 @@
origin_layer->SetPosition(
gfx::PointAtOffsetFromOrigin(-clip_rect.OffsetFromOrigin()));
- origin_layer->AddChild(delegated_renderer_layer.Pass());
+ origin_layer->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
clip_layer->AddChild(origin_layer.Pass());
root_layer->AddChild(clip_layer.Pass());
} else {
- root_layer->AddChild(delegated_renderer_layer.Pass());
+ root_layer->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
}
host_impl_->active_tree()->SetRootLayer(root_layer.Pass());
@@ -1329,8 +1330,8 @@
}
TEST_F(DelegatedRendererLayerImplTest, InvalidRenderPassDrawQuad) {
- scoped_ptr<LayerImpl> root_layer =
- LayerImpl::Create(host_impl_->active_tree(), 1);
+ scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(
+ host_impl_->active_tree(), 1).PassAs<LayerImpl>();
scoped_ptr<FakeDelegatedRendererLayerImpl> delegated_renderer_layer =
FakeDelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 4);
@@ -1364,7 +1365,7 @@
// The RenderPasses should be taken by the layer.
EXPECT_EQ(0u, delegated_render_passes.size());
- root_layer->AddChild(delegated_renderer_layer.Pass());
+ root_layer->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
host_impl_->active_tree()->SetRootLayer(root_layer.Pass());
LayerTreeHostImpl::FrameData frame;
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.cc ('k') | cc/layers/heads_up_display_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698