SurfaceFlinger: Add transaction proto and parser
Bug: 200284593
Test: atest libsurfaceflinger_unittest
Change-Id: Ia7cfde03a1d9df12fc6f4d35e7a93d41f680c180
diff --git a/services/surfaceflinger/layerproto/common.proto b/services/surfaceflinger/layerproto/common.proto
index 1c73a9f..a6d8d61 100644
--- a/services/surfaceflinger/layerproto/common.proto
+++ b/services/surfaceflinger/layerproto/common.proto
@@ -18,6 +18,11 @@
option optimize_for = LITE_RUNTIME;
package android.surfaceflinger;
+message RegionProto {
+ reserved 1; // Previously: uint64 id
+ repeated RectProto rect = 2;
+}
+
message RectProto {
int32 left = 1;
int32 top = 2;
@@ -36,4 +41,51 @@
float dsdy = 3;
float dtdy = 4;
int32 type = 5;
-}
\ No newline at end of file
+}
+
+message ColorProto {
+ float r = 1;
+ float g = 2;
+ float b = 3;
+ float a = 4;
+}
+
+message InputWindowInfoProto {
+ uint32 layout_params_flags = 1;
+ int32 layout_params_type = 2;
+ RectProto frame = 3;
+ RegionProto touchable_region = 4;
+
+ int32 surface_inset = 5;
+ bool visible = 6;
+ bool can_receive_keys = 7 [deprecated = true];
+ bool focusable = 8;
+ bool has_wallpaper = 9;
+
+ float global_scale_factor = 10;
+ float window_x_scale = 11 [deprecated = true];
+ float window_y_scale = 12 [deprecated = true];
+
+ int32 crop_layer_id = 13;
+ bool replace_touchable_region_with_crop = 14;
+ RectProto touchable_region_crop = 15;
+ TransformProto transform = 16;
+}
+
+message BlurRegion {
+ uint32 blur_radius = 1;
+ uint32 corner_radius_tl = 2;
+ uint32 corner_radius_tr = 3;
+ uint32 corner_radius_bl = 4;
+ float corner_radius_br = 5;
+ float alpha = 6;
+ int32 left = 7;
+ int32 top = 8;
+ int32 right = 9;
+ int32 bottom = 10;
+}
+
+message ColorTransformProto {
+ // This will be a 4x4 matrix of float values
+ repeated float val = 1;
+}