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

Side by Side Diff: cc/trees/layer_tree_host_unittest_serialization.cc

Issue 2141233002: cc: Clean up RecordingSource API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ContentLayerClient* painter from UpdateAndExpandInvalidation and sync to head Created 4 years, 4 months 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/trees/layer_tree_host_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698