OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 syntax = "proto2"; | |
6 | |
7 import "element_id.proto"; | |
8 import "layer_sticky_position_constraint.proto"; | |
9 import "rectf.proto"; | |
10 import "scroll_offset.proto"; | |
11 import "size.proto"; | |
12 import "skxfermode.proto"; | |
13 import "synced_property.proto"; | |
14 import "transform.proto"; | |
15 import "vector2df.proto"; | |
16 | |
17 option optimize_for = LITE_RUNTIME; | |
18 | |
19 package cc.proto; | |
20 | |
21 // The messages declared in this file correspond to the classes declared in | |
22 // cc/trees/property_tree.h | |
23 | |
24 // Proto for struct TransformNodeData. | |
25 // NEXT ID: 44 | |
26 message TranformNodeData { | |
27 optional Transform pre_local = 1; | |
28 optional Transform local = 2; | |
29 optional Transform post_local = 3; | |
30 optional Transform to_parent = 4; | |
31 | |
32 optional int64 source_node_id = 11; | |
33 optional bool needs_local_transform_update = 12; | |
34 optional bool node_and_ancestors_are_animated_or_invertible = 41; | |
35 optional bool is_invertible = 13; | |
36 optional bool ancestors_are_invertible = 14; | |
37 optional bool has_potential_animation = 15; | |
38 optional bool is_currently_animating = 42; | |
39 optional bool to_screen_is_potentially_animated = 16; | |
40 optional bool has_only_translation_animations = 17; | |
41 optional bool flattens_inherited_transform = 19; | |
42 optional bool node_and_ancestors_are_flat = 20; | |
43 optional bool node_and_ancestors_have_only_integer_translation = 21; | |
44 optional bool scrolls = 22; | |
45 optional bool should_be_snapped = 43; | |
46 optional bool moved_by_inner_viewport_bounds_delta_x = 24; | |
47 optional bool moved_by_inner_viewport_bounds_delta_y = 25; | |
48 optional bool moved_by_outer_viewport_bounds_delta_x = 26; | |
49 optional bool moved_by_outer_viewport_bounds_delta_y = 27; | |
50 optional bool in_subtree_of_page_scale_layer = 28; | |
51 optional bool transform_changed = 40; | |
52 optional float post_local_scale_factor = 29; | |
53 | |
54 optional ScrollOffset scroll_offset = 35; | |
55 optional Vector2dF snap_amount = 36; | |
56 optional Vector2dF source_offset = 37; | |
57 optional Vector2dF source_to_parent = 38; | |
58 optional int64 sorting_context_id = 39; | |
59 } | |
60 | |
61 // Proto for TransformCachedNodeData | |
62 message TransformCachedNodeData { | |
63 optional Transform from_screen = 3; | |
64 optional Transform to_screen = 4; | |
65 optional int64 target_id = 5; | |
66 optional int64 content_target_id = 6; | |
67 optional bool is_showing_backface = 7; | |
68 } | |
69 | |
70 // Proto for StickyPositionNodeData | |
71 message StickyPositionNodeData { | |
72 optional int64 scroll_ancestor = 1; | |
73 optional LayerStickyPositionConstraint constraints = 2; | |
74 optional Vector2dF main_thread_offset = 3; | |
75 } | |
76 | |
77 // Proto for struct ClipNodeData. | |
78 // NEXT ID: 14 | |
79 message ClipNodeData { | |
80 enum ClipType { | |
81 NONE = 1; | |
82 APPLIES_LOCAL_CLIP = 2; | |
83 } | |
84 optional ClipType clip_type = 13; | |
85 optional RectF clip = 1; | |
86 optional RectF combined_clip_in_target_space = 2; | |
87 optional RectF clip_in_target_space = 3; | |
88 | |
89 optional int64 transform_id = 4; | |
90 optional int64 target_transform_id = 5; | |
91 optional int64 target_effect_id = 12; | |
92 optional bool applies_local_clip = 6; | |
93 optional bool layer_clipping_uses_only_local_clip = 7; | |
94 optional bool target_is_clipped = 8; | |
95 optional bool layers_are_clipped = 9; | |
96 optional bool layers_are_clipped_when_surfaces_disabled = 10; | |
97 optional bool resets_clip = 11; | |
98 } | |
99 | |
100 // Proto for struct EffectNodeData. | |
101 // NEXT ID: 27 | |
102 message EffectNodeData { | |
103 optional float opacity = 1; | |
104 optional float screen_space_opacity = 2; | |
105 optional SkXfermode.Mode blend_mode = 25; | |
106 optional Size unscaled_mask_target_size = 26; | |
107 optional bool has_render_surface = 3; | |
108 optional bool has_copy_request = 4; | |
109 optional bool hidden_by_backface_visibility = 14; | |
110 optional bool double_sided = 13; | |
111 optional bool is_drawn = 6; | |
112 optional bool subtree_hidden = 15; | |
113 optional bool has_potential_filter_animation = 21; | |
114 optional bool has_potential_opacity_animation = 7; | |
115 optional bool is_currently_animating_filter = 22; | |
116 optional bool is_currently_animating_opacity = 16; | |
117 optional bool effect_changed = 11; | |
118 optional int64 num_copy_requests_in_subtree = 8; | |
119 optional int64 transform_id = 9; | |
120 optional int64 clip_id = 10; | |
121 optional int64 target_id = 12; | |
122 optional int64 mask_layer_id = 17; | |
123 optional Vector2dF surface_contents_scale = 20; | |
124 // TODO(nyquist): Add support for FilterOperation. See crbug.com/541321. | |
125 // repeated FilterOperation filters = 23; | |
126 // repeated FilterOperation background_filters = 24; | |
127 } | |
128 | |
129 // Proto for struct ScrollNodeData | |
130 // NEXT ID: 16 | |
131 message ScrollNodeData { | |
132 optional bool scrollable = 1; | |
133 optional int32 main_thread_scrolling_reasons = 2; | |
134 optional bool contains_non_fast_scrollable_region = 3; | |
135 optional Size scroll_clip_layer_bounds = 4; | |
136 optional Size bounds = 5; | |
137 optional bool max_scroll_offset_affected_by_page_scale = 6; | |
138 optional bool is_inner_viewport_scroll_layer = 7; | |
139 optional bool is_outer_viewport_scroll_layer = 8; | |
140 optional Vector2dF offset_to_transform_parent = 9; | |
141 optional bool should_flatten = 10; | |
142 optional bool user_scrollable_horizontal = 13; | |
143 optional bool user_scrollable_vertical = 14; | |
144 optional ElementId element_id = 15; | |
145 optional int64 transform_id = 11; | |
146 } | |
147 | |
148 // This defines the proto used for all types of struct TreeNode. | |
149 message TreeNode { | |
150 // The following fields are the base TreeNode properties. This list | |
151 // corresponds to the data members from struct TreeNode. | |
152 optional int64 id = 1; | |
153 optional int64 parent_id = 2; | |
154 optional int64 owner_id = 3; | |
155 | |
156 // The following fields correspond to the possible values for TreeNode::data. | |
157 // Only one of these fields should be set, based on the type of property tree | |
158 // this node belongs to. | |
159 optional TranformNodeData transform_node_data = 1000; | |
160 optional ClipNodeData clip_node_data = 1001; | |
161 optional EffectNodeData effect_node_data = 1002; | |
162 optional ScrollNodeData scroll_node_data = 1003; | |
163 } | |
164 | |
165 // This defines the proto used for all property trees. PropertyType denotes the | |
166 // type of this tree. | |
167 message PropertyTree { | |
168 enum PropertyType { | |
169 Transform = 1; | |
170 Clip = 2; | |
171 Effect = 3; | |
172 Scroll = 4; | |
173 } | |
174 | |
175 // The following fields are the base PropertyTree properties. This list | |
176 // corresponds to the data members from class PropertyTree. | |
177 optional PropertyType property_type = 1; | |
178 repeated TreeNode nodes = 2; | |
179 optional bool needs_update = 3; | |
180 | |
181 // The following fields denote the data members for each subclass of | |
182 // PropertyTree. Only one of these fields should be set, depending on the type | |
183 // of this property tree. | |
184 optional TransformTreeData transform_tree_data = 1000; | |
185 optional ScrollTreeData scroll_tree_data = 1001; | |
186 optional EffectTreeData effect_tree_data = 1002; | |
187 } | |
188 | |
189 message ScrollOffsetMapEntry { | |
190 required int64 layer_id = 1; | |
191 optional SyncedProperty scroll_offset = 2; | |
192 } | |
193 | |
194 // Proto for data members of class ScrollTree | |
195 message ScrollTreeData { | |
196 optional int64 currently_scrolling_node_id = 1; | |
197 repeated ScrollOffsetMapEntry layer_id_to_scroll_offset_map = 2; | |
198 } | |
199 | |
200 // Proto for data members of class TransformTree. | |
201 message TransformTreeData { | |
202 optional bool source_to_parent_updates_allowed = 1; | |
203 optional float page_scale_factor = 2; | |
204 optional float device_scale_factor = 3; | |
205 optional float device_transform_scale_factor = 4; | |
206 repeated int64 nodes_affected_by_inner_viewport_bounds_delta = 7 | |
207 [packed = true]; | |
208 repeated int64 nodes_affected_by_outer_viewport_bounds_delta = 8 | |
209 [packed = true]; | |
210 repeated TransformCachedNodeData cached_data = 9; | |
211 repeated StickyPositionNodeData sticky_position_data = 10; | |
212 } | |
213 | |
214 // Proto for data members of class EffectTree. | |
215 message EffectTreeData { | |
216 repeated int64 mask_layer_ids = 1 [packed = true]; | |
217 } | |
218 | |
219 // Proto for class PropertyTrees. | |
220 // NEXT ID: 17 | |
221 message PropertyTrees { | |
222 optional PropertyTree transform_tree = 1; | |
223 optional PropertyTree effect_tree = 2; | |
224 optional PropertyTree clip_tree = 3; | |
225 optional PropertyTree scroll_tree = 7; | |
226 | |
227 optional bool needs_rebuild = 4; | |
228 optional bool non_root_surfaces_enabled = 5; | |
229 optional bool changed = 11; | |
230 optional bool full_tree_damaged = 12; | |
231 optional int64 sequence_number = 6; | |
232 optional bool is_main_thread = 13; | |
233 optional bool is_active = 14; | |
234 | |
235 optional Vector2dF inner_viewport_container_bounds_delta = 8; | |
236 optional Vector2dF outer_viewport_container_bounds_delta = 9; | |
237 optional Vector2dF inner_viewport_scroll_bounds_delta = 10; | |
238 repeated int64 always_use_active_tree_opacity_effect_ids = 15 [packed = true]; | |
239 } | |
OLD | NEW |