summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pablo Gamito <pablogamito@google.com> 2021-08-10 09:55:42 +0000
committer Pablo Gamito <pablogamito@google.com> 2021-08-16 08:57:14 +0000
commit90a405ca3a31c30a93cac6be67341ae29e4d80a7 (patch)
tree02bb1e99d8ff9e228146c716b0857e14c69e943b
parentf334812daa74bb651590334f60229262dad11b81 (diff)
Add requested_corner_radius to layer proto
Test: Check that it shows up in the dumped proto files (e.g. Winscope) Bug: 193875495 Change-Id: Ib9f68260f73aff3adc455b5ea8e314a96e514fa7 Merged-In: Ib9f68260f73aff3adc455b5ea8e314a96e514fa7 (cherry picked from commit abdf4dab40d023d4e0b8ebf93686829f6a41e746)
-rw-r--r--services/surfaceflinger/Layer.cpp1
-rw-r--r--services/surfaceflinger/layerproto/layers.proto5
2 files changed, 5 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 2f995ab648..b511171dc7 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2050,6 +2050,7 @@ void Layer::writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags,
layerInfo->set_curr_frame(mCurrentFrameNumber);
layerInfo->set_effective_scaling_mode(getEffectiveScalingMode());
+ layerInfo->set_requested_corner_radius(getDrawingState().cornerRadius);
layerInfo->set_corner_radius(getRoundedCornerState().radius);
layerInfo->set_background_blur_radius(getBackgroundBlurRadius());
layerInfo->set_is_trusted_overlay(isTrustedOverlay());
diff --git a/services/surfaceflinger/layerproto/layers.proto b/services/surfaceflinger/layerproto/layers.proto
index dddc677715..9f4e7d2eb2 100644
--- a/services/surfaceflinger/layerproto/layers.proto
+++ b/services/surfaceflinger/layerproto/layers.proto
@@ -130,6 +130,9 @@ message LayerProto {
repeated BlurRegion blur_regions = 54;
bool is_trusted_overlay = 55;
+
+ // Corner radius explicitly set on layer rather than inherited
+ float requested_corner_radius = 56;
}
message PositionProto {
@@ -228,4 +231,4 @@ message BlurRegion {
int32 top = 8;
int32 right = 9;
int32 bottom = 10;
-} \ No newline at end of file
+}