| OLD | NEW | 
|---|
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|