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

Unified Diff: cc/proto/property_tree.proto

Issue 1417963011: Added serialization to protobufs for property trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn fix Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: cc/proto/property_tree.proto
diff --git a/cc/proto/property_tree.proto b/cc/proto/property_tree.proto
new file mode 100644
index 0000000000000000000000000000000000000000..d25f7766bb41d82c1e4c20d61be20f72c35baa91
--- /dev/null
+++ b/cc/proto/property_tree.proto
@@ -0,0 +1,165 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+syntax = "proto2";
+
+import "rectf.proto";
+import "scroll_offset.proto";
+import "transform.proto";
+import "vector2df.proto";
+
+option optimize_for = LITE_RUNTIME;
+
+package cc.proto;
+
+message TranformNodeData {
+ optional cc.proto.Transform pre_local = 1;
+ optional cc.proto.Transform local = 2;
+ optional cc.proto.Transform post_local = 3;
+
+ optional cc.proto.Transform to_parent = 4;
+
+ optional cc.proto.Transform to_target = 5;
+ optional cc.proto.Transform from_target = 6;
+
+ optional cc.proto.Transform to_screen = 7;
+ optional cc.proto.Transform from_screen = 8;
+
+ optional int64 target_id = 9;
+ optional int64 content_target_id = 10;
+
+ optional int64 source_node_id = 11;
+
+ optional bool needs_local_transform_update = 12;
+
+ optional bool is_invertible = 13;
+ optional bool ancestors_are_invertible = 14;
+
+ optional bool is_animated = 15;
+ optional bool to_screen_is_animated = 16;
+ optional bool has_only_translation_animations = 17;
+ optional bool to_screen_has_scale_animation = 18;
+
+ optional bool flattens_inherited_transform = 19;
+
+ optional bool node_and_ancestors_are_flat = 20;
+
+ optional bool node_and_ancestors_have_only_integer_translation = 21;
+
+ optional bool scrolls = 22;
+
+ optional bool needs_sublayer_scale = 23;
+
+ optional bool affected_by_inner_viewport_bounds_delta_x = 24;
+ optional bool affected_by_inner_viewport_bounds_delta_y = 25;
+ optional bool affected_by_outer_viewport_bounds_delta_x = 26;
+ optional bool affected_by_outer_viewport_bounds_delta_y = 27;
+
+ optional bool in_subtree_of_page_scale_layer = 28;
+
+ optional float post_local_scale_factor = 29;
+
+ optional float local_maximum_animation_target_scale = 30;
+
+ optional float local_starting_animation_scale = 31;
+
+ optional float combined_maximum_animation_target_scale = 32;
+
+ optional float combined_starting_animation_scale = 33;
+
+ optional cc.proto.Vector2dF sublayer_scale = 34;
+
+ optional cc.proto.ScrollOffset scroll_offset = 35;
+
+ optional cc.proto.Vector2dF scroll_snap = 36;
+
+ optional cc.proto.Vector2dF source_offset = 37;
+ optional cc.proto.Vector2dF source_to_parent = 38;
+}
+
+message ClipNodeData {
+ optional cc.proto.RectF clip = 1;
+
+ optional cc.proto.RectF combined_clip_in_target_space = 2;
+ optional cc.proto.RectF clip_in_target_space = 3;
+
+ optional int64 transform_id = 4;
+
+ optional int64 target_id = 5;
+
+ optional bool applies_local_clip = 6;
+
+ optional bool layer_clipping_uses_only_local_clip = 7;
+
+ optional bool target_is_clipped = 8;
+
+ optional bool layers_are_clipped = 9;
+ optional bool layers_are_clipped_when_surfaces_disabled = 10;
+
+ optional bool resets_clip = 11;
+}
+
+message EffectNodeData {
+ optional float opacity = 1;
+ optional float screen_space_opacity = 2;
+
+ optional bool has_render_surface = 3;
+ optional int64 transform_id = 4;
+ optional int64 clip_id = 5;
+}
+
+message TreeNode {
+ enum PropertyType {
+ Transform = 1;
+ Clip = 2;
+ Effect = 3;
+ }
+
+ optional int64 id = 1;
+ optional int64 parent_id = 2;
+ optional int64 owner_id = 3;
+
+ optional PropertyType property_type = 100;
+ optional cc.proto.TranformNodeData transform_node_data = 101;
+ optional cc.proto.ClipNodeData clip_node_data = 102;
+ optional cc.proto.EffectNodeData effect_node_data = 103;
+}
+
+message PropertyTree {
David Trainor- moved to gerrit 2015/11/11 16:43:16 Would it make more sense for this to look somethin
Khushal 2015/11/11 19:14:13 I was trying to structure the property tree protos
Khushal 2015/11/12 00:33:10 I re-structured the proto to have the type in the
+ repeated cc.proto.TreeNode nodes = 1;
+ optional bool needs_update = 2;
+}
+
+message TransformTree {
+ optional cc.proto.PropertyTree property_tree = 1;
+
+ optional bool source_to_parent_updates_allowed = 100;
+ optional float page_scale_factor = 101;
+ optional float device_scale_factor = 102;
+ optional float device_transform_scale_factor = 103;
+ optional cc.proto.Vector2dF inner_viewport_bounds_delta = 104;
+ optional cc.proto.Vector2dF outer_viewport_bounds_delta = 105;
+ repeated int64 nodes_affected_by_inner_viewport_bounds_delta = 106
+ [packed = true];
+ repeated int64 nodes_affected_by_outer_viewport_bounds_delta = 107
+ [packed = true];
+}
+
+message ClipTree {
+ optional cc.proto.PropertyTree property_tree = 1;
+}
+
+message EffectTree {
+ optional cc.proto.PropertyTree property_tree = 1;
+}
+
+message PropertyTrees {
+ optional cc.proto.TransformTree transform_tree = 1;
+ optional cc.proto.EffectTree effect_tree = 2;
+ optional cc.proto.ClipTree clip_tree = 3;
+
+ optional bool needs_rebuild = 100;
+ optional bool non_root_surfaces_enabled = 101;
+ optional int64 sequence_number = 102;
+}

Powered by Google App Engine
This is Rietveld 408576698