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

Side by Side Diff: cc/debug/micro_benchmark_controller_unittest.cc

Issue 1419283002: cc: Split Proxy and TaskRunnerProvider for the LayerTreeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/delegated_renderer_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/callback.h" 5 #include "base/callback.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "cc/debug/micro_benchmark.h" 7 #include "cc/debug/micro_benchmark.h"
8 #include "cc/debug/micro_benchmark_controller.h" 8 #include "cc/debug/micro_benchmark_controller.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/test/fake_impl_task_runner_provider.h" 10 #include "cc/test/fake_impl_task_runner_provider.h"
(...skipping 14 matching lines...) Expand all
25 void SetUp() override { 25 void SetUp() override {
26 impl_task_runner_provider_ = 26 impl_task_runner_provider_ =
27 make_scoped_ptr(new FakeImplTaskRunnerProvider); 27 make_scoped_ptr(new FakeImplTaskRunnerProvider);
28 layer_tree_host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl( 28 layer_tree_host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl(
29 impl_task_runner_provider_.get(), &shared_bitmap_manager_, 29 impl_task_runner_provider_.get(), &shared_bitmap_manager_,
30 &task_graph_runner_)); 30 &task_graph_runner_));
31 31
32 layer_tree_host_ = FakeLayerTreeHost::Create(&layer_tree_host_client_, 32 layer_tree_host_ = FakeLayerTreeHost::Create(&layer_tree_host_client_,
33 &task_graph_runner_); 33 &task_graph_runner_);
34 layer_tree_host_->SetRootLayer(Layer::Create(LayerSettings())); 34 layer_tree_host_->SetRootLayer(Layer::Create(LayerSettings()));
35 layer_tree_host_->InitializeForTesting(scoped_ptr<Proxy>(new FakeProxy)); 35 layer_tree_host_->InitializeForTesting(
36 TaskRunnerProvider::Create(nullptr, nullptr),
37 scoped_ptr<Proxy>(new FakeProxy));
36 } 38 }
37 39
38 void TearDown() override { 40 void TearDown() override {
39 layer_tree_host_impl_ = nullptr; 41 layer_tree_host_impl_ = nullptr;
40 layer_tree_host_ = nullptr; 42 layer_tree_host_ = nullptr;
41 impl_task_runner_provider_ = nullptr; 43 impl_task_runner_provider_ = nullptr;
42 } 44 }
43 45
44 FakeLayerTreeHostClient layer_tree_host_client_; 46 FakeLayerTreeHostClient layer_tree_host_client_;
45 TestTaskGraphRunner task_graph_runner_; 47 TestTaskGraphRunner task_graph_runner_;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Send invalid message to valid benchmark 173 // Send invalid message to valid benchmark
172 message = make_scoped_ptr(new base::DictionaryValue); 174 message = make_scoped_ptr(new base::DictionaryValue);
173 message->SetBoolean("can_handle", false); 175 message->SetBoolean("can_handle", false);
174 message_handled = 176 message_handled =
175 layer_tree_host_->SendMessageToMicroBenchmark(id, message.Pass()); 177 layer_tree_host_->SendMessageToMicroBenchmark(id, message.Pass());
176 EXPECT_FALSE(message_handled); 178 EXPECT_FALSE(message_handled);
177 } 179 }
178 180
179 } // namespace 181 } // namespace
180 } // namespace cc 182 } // namespace cc
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/delegated_renderer_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698