Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2173449d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [9007561, 9007562, 9007563, 9007600, 9007801, 9007895,...

Merge cherrypicks of [9007561, 9007562, 9007563, 9007600, 9007801, 9007895, 9007389] into qt-release

Change-Id: I10d7f5b7ccd28effeb39bbbbb7a454d819e1f93d
parents fa7b4252 295f80ce
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -575,10 +575,11 @@ String8 ProgramCache::generateFragmentShader(const Key& needs) {
            float applyCornerRadius(vec2 cropCoords)
            {
                vec2 position = cropCoords - cropCenter;
                // Increase precision here so that a large corner radius doesn't
                // cause floating point error
                highp vec2 dist = abs(position) + vec2(cornerRadius) - cropCenter;
                float plane = length(max(dist, vec2(0.0)));
                // Scale down the dist vector here, as otherwise large corner
                // radii can cause floating point issues when computing the norm
                vec2 dist = (abs(position) - cropCenter + vec2(cornerRadius)) / 16.0;
                // Once we've found the norm, then scale back up.
                float plane = length(max(dist, vec2(0.0))) * 16.0;
                return 1.0 - clamp(plane - cornerRadius, 0.0, 1.0);
            }
            )__SHADER__";