| 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 "display_item.proto"; | |
| 8 import "layer_position_constraint.proto"; | |
| 9 import "layer_sticky_position_constraint.proto"; | |
| 10 import "point3f.proto"; | |
| 11 import "pointf.proto"; | |
| 12 import "rect.proto"; | |
| 13 import "region.proto"; | |
| 14 import "scroll_offset.proto"; | |
| 15 import "size.proto"; | |
| 16 import "skxfermode.proto"; | |
| 17 import "transform.proto"; | |
| 18 import "vector2df.proto"; | |
| 19 | |
| 20 package cc.proto; | |
| 21 | |
| 22 option optimize_for = LITE_RUNTIME; | |
| 23 | |
| 24 // Hierarchical structure for serializing the Layer tree. | |
| 25 message LayerNode { | |
| 26 // Identifies the type of cc:Layer a LayerNode represents. It is used to | |
| 27 // facilitate reconstruction of a Layer of the correct type on the client. | |
| 28 enum Type { | |
| 29 UNKNOWN = 0; | |
| 30 LAYER = 1; | |
| 31 PICTURE_LAYER = 2; | |
| 32 SOLID_COLOR_SCROLLBAR_LAYER = 4; | |
| 33 | |
| 34 // Layer Types for testing only. | |
| 35 FAKE_PICTURE_LAYER = 5; | |
| 36 PUSH_PROPERTIES_COUNTING_LAYER = 6; | |
| 37 | |
| 38 // TODO(nyquist): Add the rest of the necessary LayerTypes. | |
| 39 }; | |
| 40 | |
| 41 // required | |
| 42 optional int32 id = 1; | |
| 43 // required | |
| 44 optional Type type = 2; | |
| 45 optional int32 parent_id = 3; | |
| 46 // A List of all the children of the current LayerNode. | |
| 47 repeated LayerNode children = 4; | |
| 48 optional LayerNode mask_layer = 5; | |
| 49 | |
| 50 // Set for SolidColorScrollbarLayers. | |
| 51 optional SolidColorScrollbarLayerProperties solid_scrollbar = 6; | |
| 52 } | |
| 53 | |
| 54 // A container for a list of dirty layers. | |
| 55 message LayerUpdate { | |
| 56 // A list of dirty layers. | |
| 57 repeated LayerProperties layers = 1; | |
| 58 } | |
| 59 | |
| 60 message LayerProperties { | |
| 61 // required | |
| 62 optional int32 id = 1; | |
| 63 | |
| 64 // The properties below are only read if |needs_push_properties| is set. | |
| 65 // The Layer base class and each descendant have different proto messages | |
| 66 // for their specific properties. | |
| 67 optional BaseLayerProperties base = 5; | |
| 68 | |
| 69 // Only one of these fields may be set per LayerProperties. | |
| 70 // TODO(dtrainor): use a 'oneof' union when it's supported in Chromium. See | |
| 71 // crbug.com/570371. | |
| 72 optional PictureLayerProperties picture = 6; | |
| 73 } | |
| 74 | |
| 75 // NEXT ID: 59 | |
| 76 message BaseLayerProperties { | |
| 77 // The following fields mirror the data stored in Layer::Inputs. | |
| 78 optional Rect update_rect = 46; | |
| 79 optional Size bounds = 3; | |
| 80 optional bool masks_to_bounds = 14; | |
| 81 optional float opacity = 22; | |
| 82 optional SkXfermode.Mode blend_mode = 23; | |
| 83 optional bool is_root_for_isolated_group = 24; | |
| 84 optional bool contents_opaque = 21; | |
| 85 optional PointF position = 25; | |
| 86 optional Transform transform = 33; | |
| 87 optional Point3F transform_origin = 1; | |
| 88 optional bool is_drawable = 56; | |
| 89 optional bool double_sided = 8; | |
| 90 optional bool should_flatten_transform = 28; | |
| 91 optional int32 sorting_context_id = 35; | |
| 92 optional bool use_parent_backface_visibility = 32; | |
| 93 optional uint32 background_color = 2; | |
| 94 // TODO(nyquist): Add support for FilterOperation. See crbug.com/541321. | |
| 95 // repeated FilterOperation filters = 12; | |
| 96 // repeated FilterOperation background_filters = 13; | |
| 97 // optional PointF filters_origin = 57 | |
| 98 optional ScrollOffset scroll_offset = 44; | |
| 99 optional int32 scroll_clip_layer_id = 37; | |
| 100 optional bool user_scrollable_horizontal = 38; | |
| 101 optional bool user_scrollable_vertical = 39; | |
| 102 optional uint32 main_thread_scrolling_reasons = 15; | |
| 103 | |
| 104 optional Region non_fast_scrollable_region = 18; | |
| 105 // TODO(khushalsagar): Do we actually need these? Touch events are never sent | |
| 106 // back to the engine. | |
| 107 optional Region touch_event_handler_region = 19; | |
| 108 | |
| 109 optional bool is_container_for_fixed_position_layers = 26; | |
| 110 optional LayerPositionConstraint position_constraint = 27; | |
| 111 optional LayerStickyPositionConstraint sticky_position_constraint = 58; | |
| 112 | |
| 113 // ElementId and mutable properties ignored because these are used by | |
| 114 // animations of Compositor-worker. | |
| 115 | |
| 116 optional int32 scroll_parent_id = 40; | |
| 117 optional int32 clip_parent_id = 42; | |
| 118 optional bool has_will_change_transform_hint = 48; | |
| 119 optional bool hide_layer_and_subtree = 10; | |
| 120 | |
| 121 // TODO(nyquist): Add support for FilterOperation. See crbug.com/541321. | |
| 122 // repeated FilterOperation filters = 12; | |
| 123 // repeated FilterOperation background_filters = 13; | |
| 124 } | |
| 125 | |
| 126 message PictureLayerProperties { | |
| 127 // The following fields mirror the data stored in | |
| 128 // PictureLayer::PictureLayerInputs. | |
| 129 optional bool nearest_neighbor = 5; | |
| 130 optional Rect recorded_viewport = 7; | |
| 131 optional DisplayItemList display_list = 8; | |
| 132 } | |
| 133 | |
| 134 message SolidColorScrollbarLayerProperties { | |
| 135 enum ScrollbarOrientation { | |
| 136 HORIZONTAL = 0; | |
| 137 VERTICAL = 1; | |
| 138 }; | |
| 139 | |
| 140 optional int32 scroll_layer_id = 1; | |
| 141 optional int32 thumb_thickness = 2; | |
| 142 optional int32 track_start = 3; | |
| 143 optional bool is_left_side_vertical_scrollbar = 4; | |
| 144 optional ScrollbarOrientation orientation = 5; | |
| 145 } | |
| OLD | NEW |