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

Unified Diff: cc/layers/picture_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/picture_layer_impl_perftest.cc ('k') | cc/layers/solid_color_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl_unittest.cc
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index b2492d3e4c2d84fdfd8cbfde81b6d2c632b2d680..c72d19c2943d245c346a10d1bb2326e55153053f 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -76,7 +76,8 @@
}
virtual void InitializeRenderer() {
- host_impl_.InitializeRenderer(FakeOutputSurface::Create3d());
+ host_impl_.InitializeRenderer(
+ FakeOutputSurface::Create3d().PassAs<OutputSurface>());
}
void SetupDefaultTrees(const gfx::Size& layer_bounds) {
@@ -144,7 +145,7 @@
scoped_ptr<FakePictureLayerImpl> pending_layer =
FakePictureLayerImpl::CreateWithPile(pending_tree, id_, pile);
pending_layer->SetDrawsContent(true);
- pending_tree->SetRootLayer(pending_layer.Pass());
+ pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>());
pending_layer_ = static_cast<FakePictureLayerImpl*>(
host_impl_.pending_tree()->LayerById(id_));
@@ -1293,8 +1294,8 @@
TestWebGraphicsContext3D::Create();
context->set_max_texture_size(140);
host_impl_.DidLoseOutputSurface();
- host_impl_.InitializeRenderer(
- FakeOutputSurface::Create3d(context.Pass()).Pass());
+ host_impl_.InitializeRenderer(FakeOutputSurface::Create3d(
+ context.Pass()).PassAs<OutputSurface>());
SetupDrawPropertiesAndUpdateTiles(pending_layer_, 1.f, 1.f, 1.f, 1.f, false);
ASSERT_EQ(2u, pending_layer_->tilings()->num_tilings());
@@ -1340,8 +1341,8 @@
TestWebGraphicsContext3D::Create();
context->set_max_texture_size(140);
host_impl_.DidLoseOutputSurface();
- host_impl_.InitializeRenderer(
- FakeOutputSurface::Create3d(context.Pass()).Pass());
+ host_impl_.InitializeRenderer(FakeOutputSurface::Create3d(
+ context.Pass()).PassAs<OutputSurface>());
SetupDrawPropertiesAndUpdateTiles(pending_layer_, 1.f, 1.f, 1.f, 1.f, false);
ASSERT_LE(1u, pending_layer_->tilings()->num_tilings());
@@ -1859,7 +1860,7 @@
scoped_ptr<FakePictureLayerImpl> pending_layer =
FakePictureLayerImpl::CreateWithPile(pending_tree, id_, pending_pile);
pending_layer->SetDrawsContent(true);
- pending_tree->SetRootLayer(pending_layer.Pass());
+ pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>());
pending_layer_ = static_cast<FakePictureLayerImpl*>(
host_impl_.pending_tree()->LayerById(id_));
@@ -2214,9 +2215,10 @@
public:
virtual void InitializeRenderer() OVERRIDE {
bool delegated_rendering = false;
- host_impl_.InitializeRenderer(FakeOutputSurface::CreateDeferredGL(
- scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice),
- delegated_rendering));
+ host_impl_.InitializeRenderer(
+ FakeOutputSurface::CreateDeferredGL(
+ scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice),
+ delegated_rendering).PassAs<OutputSurface>());
}
virtual void SetUp() OVERRIDE {
@@ -3500,7 +3502,7 @@
mask->SetDrawsContent(true);
FakePictureLayerImpl* pending_mask_content = mask.get();
- layer_with_mask->SetMaskLayer(mask.Pass());
+ layer_with_mask->SetMaskLayer(mask.PassAs<LayerImpl>());
scoped_ptr<FakePictureLayerImpl> child_of_layer_with_mask =
FakePictureLayerImpl::Create(host_impl_.pending_tree(), 4);
@@ -3509,9 +3511,9 @@
child_of_layer_with_mask->SetContentBounds(bounds);
child_of_layer_with_mask->SetDrawsContent(true);
- layer_with_mask->AddChild(child_of_layer_with_mask.Pass());
-
- root->AddChild(layer_with_mask.Pass());
+ layer_with_mask->AddChild(child_of_layer_with_mask.PassAs<LayerImpl>());
+
+ root->AddChild(layer_with_mask.PassAs<LayerImpl>());
host_impl_.pending_tree()->SetRootLayer(root.Pass());
@@ -3525,7 +3527,8 @@
PictureLayerImplTestWithDelegatingRenderer() : PictureLayerImplTest() {}
virtual void InitializeRenderer() OVERRIDE {
- host_impl_.InitializeRenderer(FakeOutputSurface::CreateDelegating3d());
+ host_impl_.InitializeRenderer(
+ FakeOutputSurface::CreateDelegating3d().PassAs<OutputSurface>());
}
};
« no previous file with comments | « cc/layers/picture_layer_impl_perftest.cc ('k') | cc/layers/solid_color_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698