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

Unified Diff: cc/test/layer_tree_test.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/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 05e4fc55c606722bc039de888584e06c0fdbb71b..15d15c1508a2a5a8e4bf1e781fe47e4ad8c74d4f 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -55,10 +55,8 @@ class ThreadProxyForTest : public ThreadProxy {
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))
- .PassAs<Proxy>();
+ return make_scoped_ptr(new ThreadProxyForTest(
+ test_hooks, host, main_task_runner, impl_task_runner));
}
virtual ~ThreadProxyForTest() {}
@@ -351,12 +349,12 @@ class LayerTreeHostForTesting : public LayerTreeHost {
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()).PassAs<LayerTreeHostImpl>();
+ test_hooks_,
+ settings(),
+ host_impl_client,
+ proxy(),
+ shared_bitmap_manager_.get(),
+ rendering_stats_instrumentation());
}
virtual void SetNeedsCommit() OVERRIDE {
@@ -654,7 +652,7 @@ void LayerTreeTest::RunTest(bool threaded,
timeout_.Cancel();
ASSERT_FALSE(layer_tree_host_.get());
- client_.reset();
+ client_ = nullptr;
if (timed_out_) {
FAIL() << "Test timed out";
return;
@@ -678,7 +676,7 @@ scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface(bool fallback) {
output_surface->capabilities().delegated_rendering);
}
output_surface_ = output_surface.get();
- return output_surface.PassAs<OutputSurface>();
+ return output_surface.Pass();
}
scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface(
@@ -707,7 +705,7 @@ int LayerTreeTest::LastCommittedSourceFrameNumber(LayerTreeHostImpl* impl)
void LayerTreeTest::DestroyLayerTreeHost() {
if (layer_tree_host_ && layer_tree_host_->root_layer())
layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
- layer_tree_host_.reset();
+ layer_tree_host_ = nullptr;
}
} // 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