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

Unified Diff: cc/layers/picture_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/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 c72d19c2943d245c346a10d1bb2326e55153053f..b2492d3e4c2d84fdfd8cbfde81b6d2c632b2d680 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -76,8 +76,7 @@ class PictureLayerImplTest : public testing::Test {
}
virtual void InitializeRenderer() {
- host_impl_.InitializeRenderer(
- FakeOutputSurface::Create3d().PassAs<OutputSurface>());
+ host_impl_.InitializeRenderer(FakeOutputSurface::Create3d());
}
void SetupDefaultTrees(const gfx::Size& layer_bounds) {
@@ -145,7 +144,7 @@ class PictureLayerImplTest : public testing::Test {
scoped_ptr<FakePictureLayerImpl> pending_layer =
FakePictureLayerImpl::CreateWithPile(pending_tree, id_, pile);
pending_layer->SetDrawsContent(true);
- pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>());
+ pending_tree->SetRootLayer(pending_layer.Pass());
pending_layer_ = static_cast<FakePictureLayerImpl*>(
host_impl_.pending_tree()->LayerById(id_));
@@ -1294,8 +1293,8 @@ TEST_F(PictureLayerImplTest, ClampTilesToToMaxTileSize) {
TestWebGraphicsContext3D::Create();
context->set_max_texture_size(140);
host_impl_.DidLoseOutputSurface();
- host_impl_.InitializeRenderer(FakeOutputSurface::Create3d(
- context.Pass()).PassAs<OutputSurface>());
+ host_impl_.InitializeRenderer(
+ FakeOutputSurface::Create3d(context.Pass()).Pass());
SetupDrawPropertiesAndUpdateTiles(pending_layer_, 1.f, 1.f, 1.f, 1.f, false);
ASSERT_EQ(2u, pending_layer_->tilings()->num_tilings());
@@ -1341,8 +1340,8 @@ TEST_F(PictureLayerImplTest, ClampSingleTileToToMaxTileSize) {
TestWebGraphicsContext3D::Create();
context->set_max_texture_size(140);
host_impl_.DidLoseOutputSurface();
- host_impl_.InitializeRenderer(FakeOutputSurface::Create3d(
- context.Pass()).PassAs<OutputSurface>());
+ host_impl_.InitializeRenderer(
+ FakeOutputSurface::Create3d(context.Pass()).Pass());
SetupDrawPropertiesAndUpdateTiles(pending_layer_, 1.f, 1.f, 1.f, 1.f, false);
ASSERT_LE(1u, pending_layer_->tilings()->num_tilings());
@@ -1860,7 +1859,7 @@ TEST_F(PictureLayerImplTest, ActivateUninitializedLayer) {
scoped_ptr<FakePictureLayerImpl> pending_layer =
FakePictureLayerImpl::CreateWithPile(pending_tree, id_, pending_pile);
pending_layer->SetDrawsContent(true);
- pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>());
+ pending_tree->SetRootLayer(pending_layer.Pass());
pending_layer_ = static_cast<FakePictureLayerImpl*>(
host_impl_.pending_tree()->LayerById(id_));
@@ -2215,10 +2214,9 @@ class DeferredInitPictureLayerImplTest : public PictureLayerImplTest {
public:
virtual void InitializeRenderer() OVERRIDE {
bool delegated_rendering = false;
- host_impl_.InitializeRenderer(
- FakeOutputSurface::CreateDeferredGL(
- scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice),
- delegated_rendering).PassAs<OutputSurface>());
+ host_impl_.InitializeRenderer(FakeOutputSurface::CreateDeferredGL(
+ scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice),
+ delegated_rendering));
}
virtual void SetUp() OVERRIDE {
@@ -3502,7 +3500,7 @@ TEST_F(PictureLayerImplTest, UpdateTilesForMasksWithNoVisibleContent) {
mask->SetDrawsContent(true);
FakePictureLayerImpl* pending_mask_content = mask.get();
- layer_with_mask->SetMaskLayer(mask.PassAs<LayerImpl>());
+ layer_with_mask->SetMaskLayer(mask.Pass());
scoped_ptr<FakePictureLayerImpl> child_of_layer_with_mask =
FakePictureLayerImpl::Create(host_impl_.pending_tree(), 4);
@@ -3511,9 +3509,9 @@ TEST_F(PictureLayerImplTest, UpdateTilesForMasksWithNoVisibleContent) {
child_of_layer_with_mask->SetContentBounds(bounds);
child_of_layer_with_mask->SetDrawsContent(true);
- layer_with_mask->AddChild(child_of_layer_with_mask.PassAs<LayerImpl>());
+ layer_with_mask->AddChild(child_of_layer_with_mask.Pass());
- root->AddChild(layer_with_mask.PassAs<LayerImpl>());
+ root->AddChild(layer_with_mask.Pass());
host_impl_.pending_tree()->SetRootLayer(root.Pass());
@@ -3527,8 +3525,7 @@ class PictureLayerImplTestWithDelegatingRenderer : public PictureLayerImplTest {
PictureLayerImplTestWithDelegatingRenderer() : PictureLayerImplTest() {}
virtual void InitializeRenderer() OVERRIDE {
- host_impl_.InitializeRenderer(
- FakeOutputSurface::CreateDelegating3d().PassAs<OutputSurface>());
+ host_impl_.InitializeRenderer(FakeOutputSurface::CreateDelegating3d());
}
};
« 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