blob: dcff80a24974491422a5570fbed881b1598cb7a0 [file] [log] [blame]
John Recke248bd12015-08-05 13:53:53 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package android.uirenderer.proto;
20
21option optimize_for = LITE_RUNTIME;
22
23message RenderNode {
24 required uint64 id = 1;
25 required string name = 2;
26 required RenderProperties properties = 3;
27 optional DisplayList display_list = 4;
28 repeated RenderNode children = 5;
29};
30
31message RenderProperties {
32 required int32 left = 1;
33 required int32 right = 2;
34 required int32 top = 3;
35 required int32 bottom = 4;
36 required int32 clip_flags = 5;
37 required float alpha = 6;
38 required float translation_x = 7;
39 required float translation_y = 8;
40 required float translation_z = 9;
41 required float elevation = 10;
42 required float rotation = 11;
43 required float rotation_x = 12;
44 required float rotation_y = 13;
45 required float scale_x = 14;
46 required float scale_y = 15;
47 required float pivot_x = 16;
48 required float pivot_y = 17;
49 required bool has_overlapping_rendering = 18;
50 required bool pivot_explicitly_set = 19;
51 required bool project_backwards = 20;
52 required bool projection_receiver = 21;
53 required RectF clip_bounds = 22;
54 optional Outline outline = 23;
55 optional RevealClip reveal_clip = 24;
56};
57
58message RectF {
59 required float left = 1;
60 required float right = 2;
61 required float top = 3;
62 required float bottom = 4;
63}
64
65message Outline {
66 required bool should_clip = 1;
67 enum Type {
68 None = 0;
69 Empty = 1;
70 ConvexPath = 2;
71 RoundRect = 3;
72 }
73 required Type type = 2;
74 required RectF bounds = 3;
75 required float radius = 4;
76 required float alpha = 5;
77 optional bytes path = 6;
78}
79
80message RevealClip {
81 required float x = 1;
82 required float y = 2;
83 required float radius = 3;
84}
85
86message DisplayList {
87 optional int32 projection_receive_index = 1;
88 repeated DrawOp draw_ops = 2;
89}
90
91message DrawOp {
92 oneof drawop {
93 DrawOp_RenderNode render_node = 1;
94 }
95}
96
97message DrawOp_RenderNode {
98 optional RenderNode node = 1;
99}