[Rounded Corners] Set the bounds correctly.
BUG: 125916918
Test: Verify with Youtube, Photos, Chrome and Camera.
Change-Id: I5cf550ac6751ce24bca7860b6f9014f0f98a14a3
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 7965245..1142df8 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1804,7 +1804,8 @@
}
}
const float radius = getDrawingState().cornerRadius;
- return radius > 0 ? RoundedCornerState(getBounds(), radius) : RoundedCornerState();
+ return radius > 0 ? RoundedCornerState(getCrop(getDrawingState()).toFloatRect(), radius)
+ : RoundedCornerState();
}
void Layer::commitChildList() {