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

Side by Side Diff: cc/layers/layer.cc

Issue 1527863002: Serialize PictureLayer properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and added comment Created 4 years, 11 months 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/layers/empty_content_layer_client.cc ('k') | cc/layers/layer_proto_converter.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 1354
1355 // Reset any state that should be cleared for the next update. 1355 // Reset any state that should be cleared for the next update.
1356 stacking_order_changed_ = false; 1356 stacking_order_changed_ = false;
1357 update_rect_ = gfx::Rect(); 1357 update_rect_ = gfx::Rect();
1358 1358
1359 needs_push_properties_ = false; 1359 needs_push_properties_ = false;
1360 num_dependents_need_push_properties_ = 0; 1360 num_dependents_need_push_properties_ = 0;
1361 } 1361 }
1362 1362
1363 void Layer::SetTypeForProtoSerialization(proto::LayerNode* proto) const { 1363 void Layer::SetTypeForProtoSerialization(proto::LayerNode* proto) const {
1364 proto->set_type(proto::LayerType::Base); 1364 proto->set_type(proto::LayerType::LAYER);
1365 } 1365 }
1366 1366
1367 void Layer::ToLayerNodeProto(proto::LayerNode* proto) const { 1367 void Layer::ToLayerNodeProto(proto::LayerNode* proto) const {
1368 proto->set_id(layer_id_); 1368 proto->set_id(layer_id_);
1369 SetTypeForProtoSerialization(proto); 1369 SetTypeForProtoSerialization(proto);
1370 1370
1371 if (parent_) 1371 if (parent_)
1372 proto->set_parent_id(parent_->id()); 1372 proto->set_parent_id(parent_->id());
1373 1373
1374 DCHECK_EQ(0, proto->children_size()); 1374 DCHECK_EQ(0, proto->children_size());
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 this, layer_tree_host_->property_trees()->transform_tree); 2042 this, layer_tree_host_->property_trees()->transform_tree);
2043 } 2043 }
2044 2044
2045 gfx::Transform Layer::screen_space_transform() const { 2045 gfx::Transform Layer::screen_space_transform() const {
2046 DCHECK_NE(transform_tree_index_, -1); 2046 DCHECK_NE(transform_tree_index_, -1);
2047 return ScreenSpaceTransformFromPropertyTrees( 2047 return ScreenSpaceTransformFromPropertyTrees(
2048 this, layer_tree_host_->property_trees()->transform_tree); 2048 this, layer_tree_host_->property_trees()->transform_tree);
2049 } 2049 }
2050 2050
2051 } // namespace cc 2051 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/empty_content_layer_client.cc ('k') | cc/layers/layer_proto_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698