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

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 ContentLayerClient* painter from UpdateAndExpandInvalidation and sync to head Created 4 years, 4 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/test/fake_recording_source.cc ('k') | cc/trees/layer_tree_host_unittest.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 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 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 1669
1672 surface_client_id_ = proto.surface_client_id(); 1670 surface_client_id_ = proto.surface_client_id();
1673 next_surface_sequence_ = proto.next_surface_sequence(); 1671 next_surface_sequence_ = proto.next_surface_sequence();
1674 } 1672 }
1675 1673
1676 AnimationHost* LayerTreeHost::animation_host() const { 1674 AnimationHost* LayerTreeHost::animation_host() const {
1677 return layer_tree_.animation_host(); 1675 return layer_tree_.animation_host();
1678 } 1676 }
1679 1677
1680 } // namespace cc 1678 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_recording_source.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698