| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 PictureLayer* picture_layer_dst = reinterpret_cast<PictureLayer*>( | 374 PictureLayer* picture_layer_dst = reinterpret_cast<PictureLayer*>( |
| 375 layer_tree_host_dst_->root_layer()->child_at(0)); | 375 layer_tree_host_dst_->root_layer()->child_at(0)); |
| 376 | 376 |
| 377 RecordingSource* recording_source_src = | 377 RecordingSource* recording_source_src = |
| 378 picture_layer_src->GetRecordingSourceForTesting(); | 378 picture_layer_src->GetRecordingSourceForTesting(); |
| 379 RecordingSource* recording_source_dst = | 379 RecordingSource* recording_source_dst = |
| 380 picture_layer_dst->GetRecordingSourceForTesting(); | 380 picture_layer_dst->GetRecordingSourceForTesting(); |
| 381 EXPECT_EQ(recording_source_src->GetSize(), recording_source_dst->GetSize()); | 381 EXPECT_EQ(recording_source_src->GetSize(), recording_source_dst->GetSize()); |
| 382 EXPECT_TRUE(AreDisplayListDrawingResultsSame( | 382 EXPECT_TRUE(AreDisplayListDrawingResultsSame( |
| 383 gfx::Rect(recording_source_src->GetSize()), | 383 gfx::Rect(recording_source_src->GetSize()), |
| 384 recording_source_src->GetDisplayItemList(), | 384 picture_layer_src->GetDisplayItemList(), |
| 385 recording_source_dst->GetDisplayItemList())); | 385 picture_layer_dst->GetDisplayItemList())); |
| 386 | 386 |
| 387 VerifySerializationAndDeserialization(); | 387 VerifySerializationAndDeserialization(); |
| 388 } | 388 } |
| 389 | 389 |
| 390 void RunAddAndRemoveNodeFromLayerTree() { | 390 void RunAddAndRemoveNodeFromLayerTree() { |
| 391 /* Testing serialization when the tree hierarchy changes like this: | 391 /* Testing serialization when the tree hierarchy changes like this: |
| 392 root root | 392 root root |
| 393 / \ / \ | 393 / \ / \ |
| 394 a b => a c | 394 a b => a c |
| 395 \ \ | 395 \ \ |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 TEST_F(LayerTreeHostSerializationTest, AddAndRemoveNodeFromLayerTree) { | 447 TEST_F(LayerTreeHostSerializationTest, AddAndRemoveNodeFromLayerTree) { |
| 448 RunAddAndRemoveNodeFromLayerTree(); | 448 RunAddAndRemoveNodeFromLayerTree(); |
| 449 } | 449 } |
| 450 | 450 |
| 451 TEST_F(LayerTreeHostSerializationTest, PictureLayerMultipleSerializations) { | 451 TEST_F(LayerTreeHostSerializationTest, PictureLayerMultipleSerializations) { |
| 452 RunPictureLayerMultipleSerializationsTest(); | 452 RunPictureLayerMultipleSerializationsTest(); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace cc | 455 } // namespace cc |
| OLD | NEW |