OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 syntax = "proto2"; | 5 syntax = "proto2"; |
6 | 6 |
| 7 import "display_list_recording_source.proto"; |
7 import "layer_position_constraint.proto"; | 8 import "layer_position_constraint.proto"; |
8 import "point3f.proto"; | 9 import "point3f.proto"; |
9 import "pointf.proto"; | 10 import "pointf.proto"; |
10 import "region.proto"; | 11 import "region.proto"; |
11 import "rect.proto"; | 12 import "rect.proto"; |
12 import "scroll_offset.proto"; | 13 import "scroll_offset.proto"; |
13 import "size.proto"; | 14 import "size.proto"; |
14 import "skxfermode.proto"; | 15 import "skxfermode.proto"; |
15 import "transform.proto"; | 16 import "transform.proto"; |
16 import "vector2df.proto"; | 17 import "vector2df.proto"; |
17 | 18 |
18 package cc.proto; | 19 package cc.proto; |
19 | 20 |
20 option optimize_for = LITE_RUNTIME; | 21 option optimize_for = LITE_RUNTIME; |
21 | 22 |
22 // Identifies the type of cc:Layer a LayerNode represents. It is used to | 23 // Identifies the type of cc:Layer a LayerNode represents. It is used to |
23 // facilitate reconstruction of a Layer of the correct type on the client. | 24 // facilitate reconstruction of a Layer of the correct type on the client. |
24 enum LayerType { | 25 enum LayerType { |
25 Base = 1; | 26 UNKNOWN = 0; |
| 27 LAYER = 1; |
| 28 PICTURE_LAYER = 2; |
26 | 29 |
27 // TODO(nyquist): Add the rest of the necessary LayerTypes. | 30 // TODO(nyquist): Add the rest of the necessary LayerTypes. |
28 }; | 31 }; |
29 | 32 |
30 // Hierarchical structure for serializing the Layer tree. | 33 // Hierarchical structure for serializing the Layer tree. |
31 message LayerNode { | 34 message LayerNode { |
32 // required | 35 // required |
33 optional int32 id = 1; | 36 optional int32 id = 1; |
34 // required | 37 // required |
35 optional LayerType type = 2; | 38 optional LayerType type = 2; |
(...skipping 15 matching lines...) Expand all Loading... |
51 optional int32 id = 1; | 54 optional int32 id = 1; |
52 // required | 55 // required |
53 optional bool needs_push_properties = 3; | 56 optional bool needs_push_properties = 3; |
54 // required | 57 // required |
55 optional int32 num_dependents_need_push_properties = 4; | 58 optional int32 num_dependents_need_push_properties = 4; |
56 | 59 |
57 // The properties below are only read if |needs_push_properties| is set. | 60 // The properties below are only read if |needs_push_properties| is set. |
58 // The Layer base class and each descendant have different proto messages | 61 // The Layer base class and each descendant have different proto messages |
59 // for their specific properties. | 62 // for their specific properties. |
60 optional BaseLayerProperties base = 5; | 63 optional BaseLayerProperties base = 5; |
| 64 |
| 65 // Only one of these fields may be set per LayerProperties. |
| 66 // TODO(dtrainor): use a 'oneof' union when it's supported in Chromium. See |
| 67 // crbug.com/570371. |
| 68 optional PictureLayerProperties picture = 6; |
61 } | 69 } |
62 | 70 |
63 message BaseLayerProperties { | 71 message BaseLayerProperties { |
64 optional Point3F transform_origin = 1; | 72 optional Point3F transform_origin = 1; |
65 optional uint32 background_color = 2; | 73 optional uint32 background_color = 2; |
66 optional Size bounds = 3; | 74 optional Size bounds = 3; |
67 optional int64 transform_free_index = 4; | 75 optional int64 transform_free_index = 4; |
68 optional int64 effect_tree_index = 5; | 76 optional int64 effect_tree_index = 5; |
69 optional int64 clip_tree_index = 6; | 77 optional int64 clip_tree_index = 6; |
70 optional Vector2dF offset_to_transform_parent = 7; | 78 optional Vector2dF offset_to_transform_parent = 7; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 122 |
115 optional Rect update_rect = 46; | 123 optional Rect update_rect = 46; |
116 optional bool stacking_order_changed = 47; | 124 optional bool stacking_order_changed = 47; |
117 | 125 |
118 // TODO(nyquist): Figure out what to do with LayerAnimationController. | 126 // TODO(nyquist): Figure out what to do with LayerAnimationController. |
119 // optional LayerAnimationController layer_animation_controller = 48; | 127 // optional LayerAnimationController layer_animation_controller = 48; |
120 | 128 |
121 // TODO(nyquist): Figure out what to do with FrameTimingRequests. | 129 // TODO(nyquist): Figure out what to do with FrameTimingRequests. |
122 // repeated FrameTimingRequest frame_timing_requests = 49; | 130 // repeated FrameTimingRequest frame_timing_requests = 49; |
123 } | 131 } |
| 132 |
| 133 message PictureLayerProperties { |
| 134 optional DisplayListRecordingSource recording_source = 1; |
| 135 optional Region invalidation = 2; |
| 136 optional Rect last_updated_visible_layer_rect = 3; |
| 137 optional bool is_mask = 4; |
| 138 optional bool nearest_neighbor = 5; |
| 139 |
| 140 optional int64 update_source_frame_number = 6; |
| 141 } |
OLD | NEW |