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"; |
| 8 import "size.proto"; |
| 9 import "rect.proto"; |
| 10 import "region.proto"; |
| 11 |
7 package cc.proto; | 12 package cc.proto; |
8 | 13 |
9 option optimize_for = LITE_RUNTIME; | 14 option optimize_for = LITE_RUNTIME; |
10 | 15 |
11 // Identifies the type of cc:Layer a LayerNode represents. It is used to | 16 // Identifies the type of cc:Layer a LayerNode represents. It is used to |
12 // facilitate reconstruction of a Layer of the correct type on the client. | 17 // facilitate reconstruction of a Layer of the correct type on the client. |
13 enum LayerType { | 18 enum LayerType { |
14 Base = 1; | 19 UNKNOWN = 0; |
| 20 LAYER = 1; |
| 21 PICTURE_LAYER = 2; |
15 | 22 |
16 // TODO(nyquist): Add the rest of the necessary LayerTypes. | 23 // TODO(nyquist): Add the rest of the necessary LayerTypes. |
17 }; | 24 }; |
18 | 25 |
19 // Hierarchical structure for serializing the Layer tree. | 26 // Hierarchical structure for serializing the Layer tree. |
20 message LayerNode { | 27 message LayerNode { |
21 // required | 28 // required |
22 optional int32 id = 1; | 29 optional int32 id = 1; |
23 // required | 30 // required |
24 optional LayerType type = 2; | 31 optional LayerType type = 2; |
(...skipping 15 matching lines...) Expand all Loading... |
40 optional int32 id = 1; | 47 optional int32 id = 1; |
41 // required | 48 // required |
42 optional bool needs_push_properties = 3; | 49 optional bool needs_push_properties = 3; |
43 // required | 50 // required |
44 optional int32 num_dependents_need_push_properties = 4; | 51 optional int32 num_dependents_need_push_properties = 4; |
45 | 52 |
46 // The properties below are only read if |needs_push_properties| is set. | 53 // The properties below are only read if |needs_push_properties| is set. |
47 // The Layer base class and each descendant have different proto messages | 54 // The Layer base class and each descendant have different proto messages |
48 // for their specific properties. | 55 // for their specific properties. |
49 optional BaseLayerProperties base = 5; | 56 optional BaseLayerProperties base = 5; |
| 57 |
| 58 // Only one of these fields may be set per LayerProperties. |
| 59 // TODO(dtrainor): use a 'oneof' union when it's supported in Chromium. See |
| 60 // crbug.com/570371. |
| 61 optional PictureLayerProperties picture = 6; |
50 } | 62 } |
51 | 63 |
52 message BaseLayerProperties { | 64 message BaseLayerProperties { |
53 // TODO(nyquist): Add all the required properties below. Huzzah! | 65 // TODO(nyquist): Add all the required properties below. Huzzah! |
54 } | 66 } |
| 67 |
| 68 message PictureLayerProperties { |
| 69 optional DisplayListRecordingSource recording_source = 1; |
| 70 optional Region invalidation = 2; |
| 71 optional Rect last_updated_visible_layer_rect = 3; |
| 72 optional bool is_mask = 4; |
| 73 optional bool nearest_neighbor = 5; |
| 74 |
| 75 optional int64 update_source_frame_number = 6; |
| 76 } |
OLD | NEW |