| OLD | NEW |
| 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/layers/layer_settings.h" | 10 #include "cc/layers/layer_settings.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 make_scoped_ptr(new FakeImplTaskRunnerProvider); | 28 make_scoped_ptr(new FakeImplTaskRunnerProvider); |
| 29 layer_tree_host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl( | 29 layer_tree_host_impl_ = make_scoped_ptr(new FakeLayerTreeHostImpl( |
| 30 impl_task_runner_provider_.get(), &shared_bitmap_manager_, | 30 impl_task_runner_provider_.get(), &shared_bitmap_manager_, |
| 31 &task_graph_runner_)); | 31 &task_graph_runner_)); |
| 32 | 32 |
| 33 layer_tree_host_ = FakeLayerTreeHost::Create(&layer_tree_host_client_, | 33 layer_tree_host_ = FakeLayerTreeHost::Create(&layer_tree_host_client_, |
| 34 &task_graph_runner_); | 34 &task_graph_runner_); |
| 35 layer_tree_host_->SetRootLayer(Layer::Create(LayerSettings())); | 35 layer_tree_host_->SetRootLayer(Layer::Create(LayerSettings())); |
| 36 layer_tree_host_->InitializeForTesting( | 36 layer_tree_host_->InitializeForTesting( |
| 37 TaskRunnerProvider::Create(nullptr, nullptr), | 37 TaskRunnerProvider::Create(nullptr, nullptr), |
| 38 scoped_ptr<Proxy>(new FakeProxy)); | 38 scoped_ptr<Proxy>(new FakeProxy), nullptr); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void TearDown() override { | 41 void TearDown() override { |
| 42 layer_tree_host_impl_ = nullptr; | 42 layer_tree_host_impl_ = nullptr; |
| 43 layer_tree_host_ = nullptr; | 43 layer_tree_host_ = nullptr; |
| 44 impl_task_runner_provider_ = nullptr; | 44 impl_task_runner_provider_ = nullptr; |
| 45 } | 45 } |
| 46 | 46 |
| 47 FakeLayerTreeHostClient layer_tree_host_client_; | 47 FakeLayerTreeHostClient layer_tree_host_client_; |
| 48 TestTaskGraphRunner task_graph_runner_; | 48 TestTaskGraphRunner task_graph_runner_; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Send invalid message to valid benchmark | 173 // Send invalid message to valid benchmark |
| 174 message = make_scoped_ptr(new base::DictionaryValue); | 174 message = make_scoped_ptr(new base::DictionaryValue); |
| 175 message->SetBoolean("can_handle", false); | 175 message->SetBoolean("can_handle", false); |
| 176 message_handled = | 176 message_handled = |
| 177 layer_tree_host_->SendMessageToMicroBenchmark(id, std::move(message)); | 177 layer_tree_host_->SendMessageToMicroBenchmark(id, std::move(message)); |
| 178 EXPECT_FALSE(message_handled); | 178 EXPECT_FALSE(message_handled); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace | 181 } // namespace |
| 182 } // namespace cc | 182 } // namespace cc |
| OLD | NEW |