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

Side by Side Diff: cc/blimp/layer_tree_host_remote.cc

Issue 2456093003: Enable more layer_tree_host_unittest for LayerTreeHostRemote. (Closed)
Patch Set: Minor polish on refactored test class. Created 4 years, 1 month 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/blimp/layer_factory.h ('k') | cc/blimp/layer_tree_host_remote_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/blimp/layer_tree_host_remote.h" 5 #include "cc/blimp/layer_tree_host_remote.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/animation/animation_host.h" 10 #include "cc/animation/animation_host.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 void LayerTreeHostRemote::SerializeCurrentState( 508 void LayerTreeHostRemote::SerializeCurrentState(
509 proto::LayerTreeHost* layer_tree_host_proto) { 509 proto::LayerTreeHost* layer_tree_host_proto) {
510 // We need to serialize only the inputs received from the embedder. 510 // We need to serialize only the inputs received from the embedder.
511 const bool inputs_only = true; 511 const bool inputs_only = true;
512 512
513 // Serialize the LayerTree. 513 // Serialize the LayerTree.
514 layer_tree_->ToProtobuf(layer_tree_host_proto->mutable_layer_tree(), 514 layer_tree_->ToProtobuf(layer_tree_host_proto->mutable_layer_tree(),
515 inputs_only); 515 inputs_only);
516 516
517 // Serialize the dirty layers. 517 // Serialize the dirty layers.
518 for (auto* layer : layer_tree_->LayersThatShouldPushProperties()) 518 std::unordered_set<Layer*> layers_need_push_properties;
519 layers_need_push_properties.swap(
520 layer_tree_->LayersThatShouldPushProperties());
521
522 for (auto* layer : layers_need_push_properties)
519 layer->ToLayerPropertiesProto( 523 layer->ToLayerPropertiesProto(
520 layer_tree_host_proto->mutable_layer_updates(), inputs_only); 524 layer_tree_host_proto->mutable_layer_updates(), inputs_only);
521 layer_tree_->LayersThatShouldPushProperties().clear();
522 525
523 std::vector<PictureData> pictures = 526 std::vector<PictureData> pictures =
524 engine_picture_cache_->CalculateCacheUpdateAndFlush(); 527 engine_picture_cache_->CalculateCacheUpdateAndFlush();
525 proto::PictureDataVectorToSkPicturesProto( 528 proto::PictureDataVectorToSkPicturesProto(
526 pictures, layer_tree_host_proto->mutable_pictures()); 529 pictures, layer_tree_host_proto->mutable_pictures());
527 } 530 }
528 531
529 } // namespace cc 532 } // namespace cc
OLDNEW
« no previous file with comments | « cc/blimp/layer_factory.h ('k') | cc/blimp/layer_tree_host_remote_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698