summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_unittest_serialization.cc
diff options
context:
space:
mode:
authorjaydasika <jaydasika@chromium.org>2016-03-21 13:44:22 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-21 20:45:22 +0000
commit9234e405c7089c47ca9d30b34846f54b1fd9b8fd (patch)
treec338cb228c148d32e26bf08f30e965904d14ab6a /cc/trees/layer_tree_host_unittest_serialization.cc
parent8b23772eff902cf5df76414e1998826e87fc8444 (diff)
downloadchromium_src-9234e405c7089c47ca9d30b34846f54b1fd9b8fd.zip
chromium_src-9234e405c7089c47ca9d30b34846f54b1fd9b8fd.tar.gz
chromium_src-9234e405c7089c47ca9d30b34846f54b1fd9b8fd.tar.bz2
cc : Make tree synchronization independent of layer tree hierarchy (2)
This CL : * Stores layers that need to push properties in LayerTreeHost(layer_set) * Deletes bools needs_push_properties and dependants_needs_push_properties from Layer. * Iterate the layer_set tp push properties during commit. * Changes what layers are serialized (Both dirty layers and their ancestors are serialized currently. With this CL, only dirty layers serialize). BUG=568874 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1808373002 Cr-Commit-Position: refs/heads/master@{#382379}
Diffstat (limited to 'cc/trees/layer_tree_host_unittest_serialization.cc')
-rw-r--r--cc/trees/layer_tree_host_unittest_serialization.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host_unittest_serialization.cc b/cc/trees/layer_tree_host_unittest_serialization.cc
index db166ed..3e3e0a1 100644
--- a/cc/trees/layer_tree_host_unittest_serialization.cc
+++ b/cc/trees/layer_tree_host_unittest_serialization.cc
@@ -49,6 +49,9 @@ class LayerTreeHostSerializationTest : public testing::Test {
void VerifySerializationAndDeserialization() {
proto::LayerTreeHost proto;
+
+ std::unordered_set<Layer*> layers_that_should_push_properties_src =
+ layer_tree_host_src_->LayersThatShouldPushProperties();
layer_tree_host_src_->ToProtobufForCommit(&proto);
layer_tree_host_dst_->FromProtobufForCommit(proto);
@@ -102,6 +105,10 @@ class LayerTreeHostSerializationTest : public testing::Test {
EXPECT_EQ(layer_tree_host_src_->id_, layer_tree_host_dst_->id_);
EXPECT_EQ(layer_tree_host_src_->next_commit_forces_redraw_,
layer_tree_host_dst_->next_commit_forces_redraw_);
+ for (auto layer : layers_that_should_push_properties_src) {
+ EXPECT_TRUE(layer_tree_host_dst_->LayerNeedsPushPropertiesForTesting(
+ layer_tree_host_dst_->LayerById(layer->id())));
+ }
if (layer_tree_host_src_->hud_layer_) {
EXPECT_EQ(layer_tree_host_src_->hud_layer_->id(),