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

Unified Diff: cc/test/layer_tree_test.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/test/layer_tree_pixel_test.cc ('k') | cc/test/pixel_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test.cc
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 15d15c1508a2a5a8e4bf1e781fe47e4ad8c74d4f..05e4fc55c606722bc039de888584e06c0fdbb71b 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -55,8 +55,10 @@
LayerTreeHost* host,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
- return make_scoped_ptr(new ThreadProxyForTest(
- test_hooks, host, main_task_runner, impl_task_runner));
+ return make_scoped_ptr(
+ new ThreadProxyForTest(
+ test_hooks, host, main_task_runner, impl_task_runner))
+ .PassAs<Proxy>();
}
virtual ~ThreadProxyForTest() {}
@@ -349,12 +351,12 @@
virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
LayerTreeHostImplClient* host_impl_client) OVERRIDE {
return LayerTreeHostImplForTesting::Create(
- test_hooks_,
- settings(),
- host_impl_client,
- proxy(),
- shared_bitmap_manager_.get(),
- rendering_stats_instrumentation());
+ test_hooks_,
+ settings(),
+ host_impl_client,
+ proxy(),
+ shared_bitmap_manager_.get(),
+ rendering_stats_instrumentation()).PassAs<LayerTreeHostImpl>();
}
virtual void SetNeedsCommit() OVERRIDE {
@@ -652,7 +654,7 @@
timeout_.Cancel();
ASSERT_FALSE(layer_tree_host_.get());
- client_ = nullptr;
+ client_.reset();
if (timed_out_) {
FAIL() << "Test timed out";
return;
@@ -676,7 +678,7 @@
output_surface->capabilities().delegated_rendering);
}
output_surface_ = output_surface.get();
- return output_surface.Pass();
+ return output_surface.PassAs<OutputSurface>();
}
scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface(
@@ -705,7 +707,7 @@
void LayerTreeTest::DestroyLayerTreeHost() {
if (layer_tree_host_ && layer_tree_host_->root_layer())
layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
- layer_tree_host_ = nullptr;
+ layer_tree_host_.reset();
}
} // namespace cc
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | cc/test/pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698