1syntax = "proto2";
2option optimize_for = LITE_RUNTIME;
3package android.surfaceflinger;
4
5message Trace {
6    repeated Increment increment = 1;
7}
8
9message Increment {
10    required int64 time_stamp = 1;
11
12    oneof increment {
13        Transaction        transaction          = 2;
14        SurfaceCreation    surface_creation     = 3;
15        SurfaceDeletion    surface_deletion     = 4;
16        BufferUpdate       buffer_update        = 5;
17        VSyncEvent         vsync_event          = 6;
18        DisplayCreation    display_creation     = 7;
19        DisplayDeletion    display_deletion     = 8;
20        PowerModeUpdate    power_mode_update    = 9;
21    }
22}
23
24message Transaction {
25    repeated SurfaceChange surface_change = 1;
26    repeated DisplayChange display_change = 2;
27
28    required bool synchronous = 3;
29    required bool animation   = 4;
30}
31
32message SurfaceChange {
33    required int32 id = 1;
34    reserved 7;
35    oneof SurfaceChange {
36        PositionChange              position                = 2;
37        SizeChange                  size                    = 3;
38        AlphaChange                 alpha                   = 4;
39        LayerChange                 layer                   = 5;
40        CropChange                  crop                    = 6;
41        MatrixChange                matrix                  = 8;
42        OverrideScalingModeChange   override_scaling_mode   = 9;
43        TransparentRegionHintChange transparent_region_hint = 10;
44        LayerStackChange            layer_stack             = 11;
45        HiddenFlagChange            hidden_flag             = 12;
46        OpaqueFlagChange            opaque_flag             = 13;
47        SecureFlagChange            secure_flag             = 14;
48        DeferredTransactionChange   deferred_transaction    = 15;
49        CornerRadiusChange          corner_radius           = 16;
50        ReparentChange              reparent                = 17;
51        RelativeParentChange        relative_parent         = 18;
52        DetachChildrenChange        detach_children         = 19;
53        ReparentChildrenChange      reparent_children       = 20;
54        BackgroundBlurRadiusChange  background_blur_radius  = 21;
55        ShadowRadiusChange          shadow_radius           = 22;
56    }
57}
58
59message PositionChange {
60    required float x = 1;
61    required float y = 2;
62}
63
64message SizeChange {
65    required uint32 w = 1;
66    required uint32 h = 2;
67}
68
69message AlphaChange {
70    required float alpha = 1;
71}
72
73message CornerRadiusChange {
74    required float corner_radius = 1;
75}
76
77message BackgroundBlurRadiusChange {
78    required float background_blur_radius = 1;
79}
80
81message LayerChange {
82    required uint32 layer = 1;
83}
84
85message CropChange {
86    required Rectangle rectangle = 1;
87}
88
89message MatrixChange {
90    required float dsdx = 1;
91    required float dtdx = 2;
92    required float dsdy = 3;
93    required float dtdy = 4;
94}
95
96message OverrideScalingModeChange {
97    required int32 override_scaling_mode = 1;
98}
99
100message TransparentRegionHintChange {
101    repeated Rectangle region = 1;
102}
103
104message LayerStackChange {
105    required uint32 layer_stack = 1;
106}
107
108message HiddenFlagChange {
109    required bool hidden_flag = 1;
110}
111
112message OpaqueFlagChange {
113    required bool opaque_flag = 1;
114}
115
116message SecureFlagChange {
117    required bool secure_flag = 1;
118}
119
120message DeferredTransactionChange {
121    required int32  layer_id     = 1;
122    required uint64 frame_number = 2;
123}
124
125message DisplayChange {
126    required int32 id = 1;
127
128    oneof DisplayChange {
129        DispSurfaceChange surface     = 2;
130        LayerStackChange  layer_stack = 3;
131        SizeChange        size        = 4;
132        ProjectionChange  projection  = 5;
133    }
134}
135
136message DispSurfaceChange {
137    required uint64 buffer_queue_id   = 1;
138    required string buffer_queue_name = 2;
139}
140
141message ProjectionChange {
142    required int32     orientation = 1;
143    required Rectangle viewport    = 2;
144    required Rectangle frame       = 3;
145}
146
147message Rectangle {
148    required int32 left   = 1;
149    required int32 top    = 2;
150    required int32 right  = 3;
151    required int32 bottom = 4;
152}
153
154message SurfaceCreation {
155    required int32  id   = 1;
156    required string name = 2;
157    required uint32 w    = 3;
158    required uint32 h    = 4;
159}
160
161message SurfaceDeletion {
162    required int32 id = 1;
163}
164
165message BufferUpdate {
166    required int32  id           = 1;
167    required uint32 w            = 2;
168    required uint32 h            = 3;
169    required uint64 frame_number = 4;
170}
171
172message VSyncEvent {
173    required int64 when = 1;
174}
175
176message DisplayCreation {
177    required int32     id                = 1;
178    required string    name              = 2;
179    optional uint64    display_id        = 3;
180    required bool      is_secure         = 4;
181}
182
183message DisplayDeletion {
184    required int32 id = 1;
185}
186
187message PowerModeUpdate {
188    required int32  id   = 1;
189    required int32  mode = 2;
190}
191
192message ReparentChange {
193    required int32 parent_id = 1;
194}
195
196message ReparentChildrenChange {
197    required int32 parent_id = 1;
198}
199
200message RelativeParentChange {
201    required int32 relative_parent_id = 1;
202    required int32 z = 2;
203}
204
205message DetachChildrenChange {
206    required bool detach_children = 1;
207}
208
209message ShadowRadiusChange {
210    required float radius = 1;
211}