 Chromium Code Reviews
 Chromium Code Reviews Issue 2456093003:
  Enable more layer_tree_host_unittest for LayerTreeHostRemote.  (Closed)
    
  
    Issue 2456093003:
  Enable more layer_tree_host_unittest for LayerTreeHostRemote.  (Closed) 
  | Index: cc/blimp/layer_tree_host_remote.cc | 
| diff --git a/cc/blimp/layer_tree_host_remote.cc b/cc/blimp/layer_tree_host_remote.cc | 
| index 56418c88418a2725a4e77caa8a73e0f68c70bffc..3e94aac020223c6af259e7941ed01c40fd4543bb 100644 | 
| --- a/cc/blimp/layer_tree_host_remote.cc | 
| +++ b/cc/blimp/layer_tree_host_remote.cc | 
| @@ -487,10 +487,13 @@ void LayerTreeHostRemote::SerializeCurrentState( | 
| inputs_only); | 
| // Serialize the dirty layers. | 
| - for (auto* layer : layer_tree_->LayersThatShouldPushProperties()) | 
| + std::unordered_set<Layer*> layers_need_push_properties; | 
| + layers_need_push_properties.swap( | 
| + layer_tree_->LayersThatShouldPushProperties()); | 
| 
Khushal
2016/10/28 23:11:50
Do you mind adding a small test for this in layer_
 
xingliu
2016/10/31 18:48:05
Done, make sense. Also tweak UpdateTrackingRemoteC
 | 
| + | 
| + for (auto* layer : layers_need_push_properties) | 
| layer->ToLayerPropertiesProto( | 
| layer_tree_host_proto->mutable_layer_updates(), inputs_only); | 
| - layer_tree_->LayersThatShouldPushProperties().clear(); | 
| std::vector<PictureData> pictures = | 
| engine_picture_cache_->CalculateCacheUpdateAndFlush(); |