| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "cc/layers/empty_content_layer_client.h" | 10 #include "cc/layers/empty_content_layer_client.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 ContentLayerClient* client = EmptyContentLayerClient::GetInstance(); | 56 ContentLayerClient* client = EmptyContentLayerClient::GetInstance(); |
| 57 return FakePictureLayer::CreateWithRecordingSource( | 57 return FakePictureLayer::CreateWithRecordingSource( |
| 58 client, std::move(recording_source)); | 58 client, std::move(recording_source)); |
| 59 } | 59 } |
| 60 } // namespace | 60 } // namespace |
| 61 | 61 |
| 62 class LayerTreeHostSerializationTest : public testing::Test { | 62 class LayerTreeHostSerializationTest : public testing::Test { |
| 63 public: | 63 public: |
| 64 LayerTreeHostSerializationTest() | 64 LayerTreeHostSerializationTest() |
| 65 : image_serialization_processor_( | 65 : image_serialization_processor_( |
| 66 base::WrapUnique(new FakeImageSerializationProcessor)), | 66 base::MakeUnique<FakeImageSerializationProcessor>()) {} |
| 67 client_src_(FakeLayerTreeHostClient::DIRECT_3D), | |
| 68 client_dst_(FakeLayerTreeHostClient::DIRECT_3D) {} | |
| 69 | 67 |
| 70 protected: | 68 protected: |
| 71 void SetUp() override { | 69 void SetUp() override { |
| 72 LayerTreeSettings settings; | 70 LayerTreeSettings settings; |
| 73 layer_tree_host_src_ = FakeLayerTreeHost::Create( | 71 layer_tree_host_src_ = FakeLayerTreeHost::Create( |
| 74 &client_src_, &task_graph_runner_src_, settings, | 72 &client_src_, &task_graph_runner_src_, settings, |
| 75 CompositorMode::SINGLE_THREADED, image_serialization_processor_.get()); | 73 CompositorMode::SINGLE_THREADED, image_serialization_processor_.get()); |
| 76 layer_tree_host_dst_ = FakeLayerTreeHost::Create( | 74 layer_tree_host_dst_ = FakeLayerTreeHost::Create( |
| 77 &client_dst_, &task_graph_runner_dst_, settings, | 75 &client_dst_, &task_graph_runner_dst_, settings, |
| 78 CompositorMode::SINGLE_THREADED, image_serialization_processor_.get()); | 76 CompositorMode::SINGLE_THREADED, image_serialization_processor_.get()); |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 446 |
| 449 TEST_F(LayerTreeHostSerializationTest, AddAndRemoveNodeFromLayerTree) { | 447 TEST_F(LayerTreeHostSerializationTest, AddAndRemoveNodeFromLayerTree) { |
| 450 RunAddAndRemoveNodeFromLayerTree(); | 448 RunAddAndRemoveNodeFromLayerTree(); |
| 451 } | 449 } |
| 452 | 450 |
| 453 TEST_F(LayerTreeHostSerializationTest, PictureLayerMultipleSerializations) { | 451 TEST_F(LayerTreeHostSerializationTest, PictureLayerMultipleSerializations) { |
| 454 RunPictureLayerMultipleSerializationsTest(); | 452 RunPictureLayerMultipleSerializationsTest(); |
| 455 } | 453 } |
| 456 | 454 |
| 457 } // namespace cc | 455 } // namespace cc |
| OLD | NEW |