| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 for (int i = 0; i < layer_update_proto.layers_size(); ++i) { | 99 for (int i = 0; i < layer_update_proto.layers_size(); ++i) { |
| 100 const proto::LayerProperties layer_properties_proto = | 100 const proto::LayerProperties layer_properties_proto = |
| 101 layer_update_proto.layers(i); | 101 layer_update_proto.layers(i); |
| 102 base_layer_properties_size += layer_properties_proto.base().ByteSize(); | 102 base_layer_properties_size += layer_properties_proto.base().ByteSize(); |
| 103 | 103 |
| 104 if (layer_properties_proto.has_picture()) { | 104 if (layer_properties_proto.has_picture()) { |
| 105 const proto::PictureLayerProperties& picture_proto = | 105 const proto::PictureLayerProperties& picture_proto = |
| 106 layer_properties_proto.picture(); | 106 layer_properties_proto.picture(); |
| 107 picture_layer_properties_size += picture_proto.ByteSize(); | 107 picture_layer_properties_size += picture_proto.ByteSize(); |
| 108 | 108 |
| 109 const proto::RecordingSource& recording_source_proto = | |
| 110 picture_proto.recording_source(); | |
| 111 const proto::DisplayItemList& display_list_proto = | 109 const proto::DisplayItemList& display_list_proto = |
| 112 recording_source_proto.display_list(); | 110 picture_proto.display_list(); |
| 113 display_item_list_size += display_list_proto.ByteSize(); | 111 display_item_list_size += display_list_proto.ByteSize(); |
| 114 | 112 |
| 115 for (int j = 0; j < display_list_proto.items_size(); ++j) { | 113 for (int j = 0; j < display_list_proto.items_size(); ++j) { |
| 116 const proto::DisplayItem& display_item = display_list_proto.items(j); | 114 const proto::DisplayItem& display_item = display_list_proto.items(j); |
| 117 if (display_item.type() == proto::DisplayItem::Type_Drawing) | 115 if (display_item.type() == proto::DisplayItem::Type_Drawing) |
| 118 drawing_display_items_size += display_item.ByteSize(); | 116 drawing_display_items_size += display_item.ByteSize(); |
| 119 } | 117 } |
| 120 } | 118 } |
| 121 } | 119 } |
| 122 | 120 |
| (...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1715 int seq_num = property_trees_.sequence_number; | 1713 int seq_num = property_trees_.sequence_number; |
| 1716 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { | 1714 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { |
| 1717 layer->set_property_tree_sequence_number(seq_num); | 1715 layer->set_property_tree_sequence_number(seq_num); |
| 1718 }); | 1716 }); |
| 1719 | 1717 |
| 1720 surface_client_id_ = proto.surface_client_id(); | 1718 surface_client_id_ = proto.surface_client_id(); |
| 1721 next_surface_sequence_ = proto.next_surface_sequence(); | 1719 next_surface_sequence_ = proto.next_surface_sequence(); |
| 1722 } | 1720 } |
| 1723 | 1721 |
| 1724 } // namespace cc | 1722 } // namespace cc |
| OLD | NEW |