Implement blur region in RenderEngine

Blur regions should be be piped through SurfaceFlinger
all the way down to the compositor, in order to render
blurs.

It's also necessary to cache them if multiple regions require
the same blur radius.

Test: manual
Test: atest SurfaceInterceptor_test
Test: atest OutputUpdateAndWriteCompositionStateTest
Bug: 159712515
Change-Id: Id4759f65eb2522a80e9328062fe641fe29786a30
diff --git a/services/surfaceflinger/layerproto/layers.proto b/services/surfaceflinger/layerproto/layers.proto
index f3f5626..9f25674 100644
--- a/services/surfaceflinger/layerproto/layers.proto
+++ b/services/surfaceflinger/layerproto/layers.proto
@@ -125,6 +125,9 @@
   int32 background_blur_radius = 52;
 
   uint32 owner_uid = 53;
+
+  // Regions of a layer, where blur should be applied.
+  repeated BlurRegion blur_regions = 54;
 }
 
 message PositionProto {
@@ -211,3 +214,16 @@
   // This will be a 4x4 matrix of float values
   repeated float val = 1;
 }
+
+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;
+}
\ No newline at end of file