diff options
| author | 2020-06-04 21:51:09 +0000 | |
|---|---|---|
| committer | 2020-06-04 21:51:09 +0000 | |
| commit | a8d1de82db55e770b6919386bc2a90fdc7079e0a (patch) | |
| tree | 6bc2e605b25c430d84be19d29a0514fc2f4cc05b /services/surfaceflinger/Layer.cpp | |
| parent | 501178aac0ef55143bb6dd6fb91872c95afd40f3 (diff) | |
| parent | eab7ea0e64a24fc254fa71f0f501c2dc8794ed72 (diff) | |
Merge "Fix issue where surface corner rounding is ignored" into rvc-dev
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
| -rw-r--r-- | services/surfaceflinger/Layer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 96552770c4..dcc213f943 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -2122,7 +2122,9 @@ Layer::RoundedCornerState Layer::getRoundedCornerState() const { // but a transform matrix can define horizontal and vertical scales. // Let's take the average between both of them and pass into the shader, practically we // never do this type of transformation on windows anyway. - parentState.radius *= (t[0][0] + t[1][1]) / 2.0f; + auto scaleX = sqrtf(t[0][0] * t[0][0] + t[0][1] * t[0][1]); + auto scaleY = sqrtf(t[1][0] * t[1][0] + t[1][1] * t[1][1]); + parentState.radius *= (scaleX + scaleY) / 2.0f; return parentState; } } |