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