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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fb7439b55a69df6fd6009310db856a1e09032537..290a601c111b3b8af3033394ce1dac9118d8f89d 100644
--- a/cc/blimp/layer_tree_host_remote.cc
+++ b/cc/blimp/layer_tree_host_remote.cc
@@ -515,10 +515,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());
+
+ 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();
« 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