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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 2141233002: cc: Clean up RecordingSource API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove recoding_source_ from PictureLayer, and move all its internal state to PictureLayer Created 4 years, 5 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
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 for (int i = 0; i < layer_update_proto.layers_size(); ++i) { 98 for (int i = 0; i < layer_update_proto.layers_size(); ++i) {
99 const proto::LayerProperties layer_properties_proto = 99 const proto::LayerProperties layer_properties_proto =
100 layer_update_proto.layers(i); 100 layer_update_proto.layers(i);
101 base_layer_properties_size += layer_properties_proto.base().ByteSize(); 101 base_layer_properties_size += layer_properties_proto.base().ByteSize();
102 102
103 if (layer_properties_proto.has_picture()) { 103 if (layer_properties_proto.has_picture()) {
104 const proto::PictureLayerProperties& picture_proto = 104 const proto::PictureLayerProperties& picture_proto =
105 layer_properties_proto.picture(); 105 layer_properties_proto.picture();
106 picture_layer_properties_size += picture_proto.ByteSize(); 106 picture_layer_properties_size += picture_proto.ByteSize();
107 107
108 const proto::RecordingSource& recording_source_proto =
109 picture_proto.recording_source();
110 const proto::DisplayItemList& display_list_proto = 108 const proto::DisplayItemList& display_list_proto =
111 recording_source_proto.display_list(); 109 picture_proto.display_list();
112 display_item_list_size += display_list_proto.ByteSize(); 110 display_item_list_size += display_list_proto.ByteSize();
113 111
114 for (int j = 0; j < display_list_proto.items_size(); ++j) { 112 for (int j = 0; j < display_list_proto.items_size(); ++j) {
115 const proto::DisplayItem& display_item = display_list_proto.items(j); 113 const proto::DisplayItem& display_item = display_list_proto.items(j);
116 if (display_item.type() == proto::DisplayItem::Type_Drawing) 114 if (display_item.type() == proto::DisplayItem::Type_Drawing)
117 drawing_display_items_size += display_item.ByteSize(); 115 drawing_display_items_size += display_item.ByteSize();
118 } 116 }
119 } 117 }
120 } 118 }
121 119
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 int seq_num = property_trees_.sequence_number; 1685 int seq_num = property_trees_.sequence_number;
1688 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { 1686 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) {
1689 layer->set_property_tree_sequence_number(seq_num); 1687 layer->set_property_tree_sequence_number(seq_num);
1690 }); 1688 });
1691 1689
1692 surface_id_namespace_ = proto.surface_id_namespace(); 1690 surface_id_namespace_ = proto.surface_id_namespace();
1693 next_surface_sequence_ = proto.next_surface_sequence(); 1691 next_surface_sequence_ = proto.next_surface_sequence();
1694 } 1692 }
1695 1693
1696 } // namespace cc 1694 } // namespace cc
OLDNEW
« cc/test/fake_recording_source.cc ('K') | « cc/test/fake_recording_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698