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

Unified Diff: cc/layers/delegated_renderer_layer_impl_unittest.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning 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 d219f5af98534662f5de113fabeb1e54d94d21c1..832a483bf06d938561353c0e357a5ee127924e0f 100644
--- a/cc/layers/delegated_renderer_layer_impl_unittest.cc
+++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc
@@ -40,8 +40,7 @@ class DelegatedRendererLayerImplTest : public testing::Test {
host_impl_.reset(
new FakeLayerTreeHostImpl(settings, &proxy_, &shared_bitmap_manager_));
- host_impl_->InitializeRenderer(
- FakeOutputSurface::Create3d().PassAs<OutputSurface>());
+ host_impl_->InitializeRenderer(FakeOutputSurface::Create3d());
host_impl_->SetViewportSize(gfx::Size(10, 10));
}
@@ -58,12 +57,12 @@ class DelegatedRendererLayerImplTestSimple
public:
DelegatedRendererLayerImplTestSimple()
: DelegatedRendererLayerImplTest() {
- 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<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<FakeDelegatedRendererLayerImpl> delegated_renderer_layer =
FakeDelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 4);
@@ -120,7 +119,7 @@ class DelegatedRendererLayerImplTestSimple
// Force the delegated RenderPasses to come before the RenderPass from
// layer_after.
- layer_after->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
+ layer_after->AddChild(delegated_renderer_layer.Pass());
root_layer->AddChild(layer_after.Pass());
// Get the RenderPass generated by layer_before to come before the delegated
@@ -633,7 +632,7 @@ class DelegatedRendererLayerImplTestTransform
root_layer_ = root_layer.get();
delegated_renderer_layer_ = delegated_renderer_layer.get();
- root_layer->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
+ root_layer->AddChild(delegated_renderer_layer.Pass());
host_impl_->active_tree()->SetRootLayer(root_layer.Pass());
}
@@ -1076,11 +1075,11 @@ class DelegatedRendererLayerImplTestClip
origin_layer->SetPosition(
gfx::PointAtOffsetFromOrigin(-clip_rect.OffsetFromOrigin()));
- origin_layer->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
+ origin_layer->AddChild(delegated_renderer_layer.Pass());
clip_layer->AddChild(origin_layer.Pass());
root_layer->AddChild(clip_layer.Pass());
} else {
- root_layer->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
+ root_layer->AddChild(delegated_renderer_layer.Pass());
}
host_impl_->active_tree()->SetRootLayer(root_layer.Pass());
@@ -1330,8 +1329,8 @@ TEST_F(DelegatedRendererLayerImplTestClip, QuadsClipped_LayerClipped_Surface) {
}
TEST_F(DelegatedRendererLayerImplTest, InvalidRenderPassDrawQuad) {
- scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(
- host_impl_->active_tree(), 1).PassAs<LayerImpl>();
+ scoped_ptr<LayerImpl> root_layer =
+ LayerImpl::Create(host_impl_->active_tree(), 1);
scoped_ptr<FakeDelegatedRendererLayerImpl> delegated_renderer_layer =
FakeDelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 4);
@@ -1365,7 +1364,7 @@ TEST_F(DelegatedRendererLayerImplTest, InvalidRenderPassDrawQuad) {
// The RenderPasses should be taken by the layer.
EXPECT_EQ(0u, delegated_render_passes.size());
- root_layer->AddChild(delegated_renderer_layer.PassAs<LayerImpl>());
+ root_layer->AddChild(delegated_renderer_layer.Pass());
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