Chromium Code Reviews| 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 "rectf.proto"; | |
| 8 import "scroll_offset.proto"; | |
| 9 import "transform.proto"; | |
| 10 import "vector2df.proto"; | |
| 11 | |
| 12 option optimize_for = LITE_RUNTIME; | |
| 13 | |
| 14 package cc.proto; | |
| 15 | |
| 16 // The messages declared in this file correspond to the classes declared in | |
| 17 // cc/trees/property_tree.h | |
|
nyquist
2015/11/16 19:48:56
Optional nit: How about //cc/trees/property_tree.h
Khushal
2015/11/16 21:30:11
It kinda looks cleaner like this. :)
| |
| 18 | |
| 19 // Proto for struct TransformNodeData. | |
| 20 message TranformNodeData { | |
| 21 optional Transform pre_local = 1; | |
| 22 optional Transform local = 2; | |
| 23 optional Transform post_local = 3; | |
| 24 optional Transform to_parent = 4; | |
| 25 optional Transform to_target = 5; | |
| 26 optional Transform from_target = 6; | |
| 27 optional Transform to_screen = 7; | |
| 28 optional Transform from_screen = 8; | |
| 29 | |
| 30 optional int64 target_id = 9; | |
| 31 optional int64 content_target_id = 10; | |
| 32 optional int64 source_node_id = 11; | |
| 33 optional bool needs_local_transform_update = 12; | |
| 34 optional bool is_invertible = 13; | |
| 35 optional bool ancestors_are_invertible = 14; | |
| 36 optional bool is_animated = 15; | |
| 37 optional bool to_screen_is_animated = 16; | |
| 38 optional bool has_only_translation_animations = 17; | |
| 39 optional bool to_screen_has_scale_animation = 18; | |
| 40 optional bool flattens_inherited_transform = 19; | |
| 41 optional bool node_and_ancestors_are_flat = 20; | |
| 42 optional bool node_and_ancestors_have_only_integer_translation = 21; | |
| 43 optional bool scrolls = 22; | |
| 44 optional bool needs_sublayer_scale = 23; | |
| 45 optional bool affected_by_inner_viewport_bounds_delta_x = 24; | |
| 46 optional bool affected_by_inner_viewport_bounds_delta_y = 25; | |
| 47 optional bool affected_by_outer_viewport_bounds_delta_x = 26; | |
| 48 optional bool affected_by_outer_viewport_bounds_delta_y = 27; | |
| 49 optional bool in_subtree_of_page_scale_layer = 28; | |
| 50 optional float post_local_scale_factor = 29; | |
| 51 optional float local_maximum_animation_target_scale = 30; | |
| 52 optional float local_starting_animation_scale = 31; | |
| 53 optional float combined_maximum_animation_target_scale = 32; | |
| 54 optional float combined_starting_animation_scale = 33; | |
| 55 | |
| 56 optional Vector2dF sublayer_scale = 34; | |
| 57 optional ScrollOffset scroll_offset = 35; | |
| 58 optional Vector2dF scroll_snap = 36; | |
| 59 optional Vector2dF source_offset = 37; | |
| 60 optional Vector2dF source_to_parent = 38; | |
| 61 } | |
| 62 | |
| 63 // Proto for struct ClipNodeData. | |
| 64 message ClipNodeData { | |
| 65 optional RectF clip = 1; | |
| 66 optional RectF combined_clip_in_target_space = 2; | |
| 67 optional RectF clip_in_target_space = 3; | |
| 68 | |
| 69 optional int64 transform_id = 4; | |
| 70 optional int64 target_id = 5; | |
| 71 optional bool applies_local_clip = 6; | |
| 72 optional bool layer_clipping_uses_only_local_clip = 7; | |
| 73 optional bool target_is_clipped = 8; | |
| 74 optional bool layers_are_clipped = 9; | |
| 75 optional bool layers_are_clipped_when_surfaces_disabled = 10; | |
| 76 optional bool resets_clip = 11; | |
| 77 } | |
| 78 | |
| 79 // Proto for struct EffectNodeData. | |
| 80 message EffectNodeData { | |
| 81 optional float opacity = 1; | |
| 82 optional float screen_space_opacity = 2; | |
| 83 optional bool has_render_surface = 3; | |
| 84 optional int64 transform_id = 4; | |
| 85 optional int64 clip_id = 5; | |
| 86 } | |
| 87 | |
| 88 // This defines the proto used for all types of struct TreeNode. | |
| 89 message TreeNode { | |
| 90 // The following fields are the base TreeNode properties. This list | |
| 91 // corresponds to the data members from struct TreeNode. | |
| 92 optional int64 id = 1; | |
| 93 optional int64 parent_id = 2; | |
| 94 optional int64 owner_id = 3; | |
| 95 | |
| 96 // The following fields correspond to the possible values for TreeNode::data. | |
| 97 // Only one of these fields should be set, based on the type of property tree | |
| 98 // this node belongs to. | |
| 99 optional TranformNodeData transform_node_data = 1000; | |
| 100 optional ClipNodeData clip_node_data = 1001; | |
| 101 optional EffectNodeData effect_node_data = 1002; | |
| 102 } | |
| 103 | |
| 104 // This defines the proto used for all property trees. PropertyType denotes the | |
| 105 // type of this tree. | |
| 106 message PropertyTree { | |
| 107 enum PropertyType { | |
| 108 Transform = 1; | |
| 109 Clip = 2; | |
| 110 Effect = 3; | |
| 111 } | |
| 112 | |
| 113 // The following fields are the base PropertyTree properties. This list | |
| 114 // corresponds to the data members from class PropertyTree. | |
| 115 optional PropertyType property_type = 1; | |
| 116 repeated TreeNode nodes = 2; | |
| 117 optional bool needs_update = 3; | |
| 118 | |
| 119 // The following fields denote the data members for each subclass of | |
| 120 // PropertyTree. Only one of these fields should be set, depending on the type | |
| 121 // of this property tree. | |
| 122 optional TransformTreeData transform_tree_data = 1000; | |
| 123 } | |
| 124 | |
| 125 // Proto for data members of class TransformTree. | |
| 126 message TransformTreeData { | |
| 127 optional bool source_to_parent_updates_allowed = 1; | |
| 128 optional float page_scale_factor = 2; | |
| 129 optional float device_scale_factor = 3; | |
| 130 optional float device_transform_scale_factor = 4; | |
| 131 optional Vector2dF inner_viewport_bounds_delta = 5; | |
| 132 optional Vector2dF outer_viewport_bounds_delta = 6; | |
| 133 repeated int64 nodes_affected_by_inner_viewport_bounds_delta = 7 | |
| 134 [packed = true]; | |
| 135 repeated int64 nodes_affected_by_outer_viewport_bounds_delta = 8 | |
| 136 [packed = true]; | |
| 137 } | |
| 138 | |
| 139 // Proto for class PropertyTrees. | |
| 140 message PropertyTrees { | |
| 141 optional PropertyTree transform_tree = 1; | |
| 142 optional PropertyTree effect_tree = 2; | |
| 143 optional PropertyTree clip_tree = 3; | |
| 144 | |
| 145 optional bool needs_rebuild = 4; | |
| 146 optional bool non_root_surfaces_enabled = 5; | |
| 147 optional int64 sequence_number = 6; | |
| 148 } | |
| OLD | NEW |