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

Commit ee0fd4ee authored by Aurélien Pomini's avatar Aurélien Pomini Committed by Android (Google) Code Review
Browse files

Merge "Correctly compute the minimum crop size" into main

parents 25ebb742 d26ea1d9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -601,8 +601,8 @@ public class WallpaperCropper {
                            .getDefaultDisplaySizes().get(orientation);
                    if (displayForThisOrientation == null) continue;
                    float sampleSizeForThisOrientation = Math.max(1f, Math.min(
                            crop.width() / displayForThisOrientation.x,
                            crop.height() / displayForThisOrientation.y));
                            (float) crop.width() / displayForThisOrientation.x,
                            (float) crop.height() / displayForThisOrientation.y));
                    sampleSize = Math.min(sampleSize, sampleSizeForThisOrientation);
                }
                // If the total crop has more width or height than either the max texture size