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

Commit 90867bf3 authored by Kshitij's avatar Kshitij
Browse files

feat: Fully resolve black backdrop on rotate

- WM shell is used on U
- Also fix luma values in the older class for consistency
parent cf7f1625
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ class ScreenRotationAnimation {
                        .build();

                t.setLayer(mBackColorSurface, -1);
                t.setColor(mBackColorSurface, new float[]{mStartLuma, mStartLuma, mStartLuma});
                t.setColor(mBackColorSurface, new float[]{0.0f, 0.0f, 0.0f});
                t.show(mBackColorSurface);
            }

@@ -346,8 +346,8 @@ class ScreenRotationAnimation {
        int colorTransitionMs = mContext.getResources().getInteger(
                R.integer.config_screen_rotation_color_transition);
        final float[] rgbTmpFloat = new float[3];
        final int startColor = Color.rgb(mStartLuma, mStartLuma, mStartLuma);
        final int endColor = Color.rgb(mEndLuma, mEndLuma, mEndLuma);
        final int startColor = Color.rgb(0, 0, 0);
        final int endColor = Color.rgb(0, 0, 0);
        final long duration = colorTransitionMs * (long) animationScale;
        final Transaction t = mTransactionPool.acquire();

+1 −1
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ class ScreenRotationAnimation {
            // disable dimming effect to get avoid of hdr content being dimmed during animation.
            t.setDimmingEnabled(mScreenshotLayer, !screenshotBuffer.containsHdrLayers());
            t.setLayer(mBackColorSurface, -1);
            t.setColor(mBackColorSurface, new float[]{mStartLuma, mStartLuma, mStartLuma});
            t.setColor(mBackColorSurface, new float[]{0.0f, 0.0f, 0.0f});
            t.setAlpha(mBackColorSurface, 1);
            t.setBuffer(mScreenshotLayer, hardwareBuffer);
            t.setColorSpace(mScreenshotLayer, screenshotBuffer.getColorSpace());