SurfaceFlinger: Handle multiple rounded corner settings
Current implementation gives precedence to the parent layers rounded corner settings. This causes surprising artifacts when rounded corners are applied at different parts of the hierarchy. For example, the pip window's rounded corner will disappear during animation if the animation leash also applies a rounded corner. Ideal fix is to support overlapping corner radius settings. But for most cases, we can fix this with a simple heuristic. A layer will use its own rounded corner settings. If the layer does not have any rounded corner settings, then its closest parent rounded corner settings will be used. A parent can override the child's rounded corner settings if its crop is entirely inside the child's rounded corner crop. What this fixes: Scenarios where both child and parent set a rounded corner radius will draw the rounded corner on the child correctly. Example, pip with onehanded mode. What doesn't change: Layers will a single rounded corner radius its hierarchy remains the same. What's still broken: If a child's rounded corner intersects with the parent's rounded corner, then the child will draw over the parent's rounded corner region. Example pip with onehanded mode and the pip window is dragged to the top right corner. Test: SurfaceFlinger_test Fixes: 191993356 Change-Id: I6975332392756d3d96fed1d6f81245a9c7bf0a19
Loading
Please register or sign in to comment