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

Commit f158b52e authored by Adam Powell's avatar Adam Powell
Browse files

Make View#computeOpaqueFlags recognize OUTSIDE_OVERLAY scrollbars

While the inset scrollbars may change padding and how backgrounds are
drawn such that an otherwise opaque view is no longer opaque. However,
OUTSIDE_OVERLAY scrollbars don't change the padding and should not
affect the determination of opacity.

Change-Id: I8c0c1408aeb540813de3351f0c0d1ad12ba5919c
parent 1f33ebd4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -10642,7 +10642,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        // Opaque if:
        //   - Has a background
        //   - Background is opaque
        //   - Doesn't have scrollbars or scrollbars are inside overlay
        //   - Doesn't have scrollbars or scrollbars overlay
        if (mBackground != null && mBackground.getOpacity() == PixelFormat.OPAQUE) {
            mPrivateFlags |= PFLAG_OPAQUE_BACKGROUND;
@@ -10652,7 +10652,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        final int flags = mViewFlags;
        if (((flags & SCROLLBARS_VERTICAL) == 0 && (flags & SCROLLBARS_HORIZONTAL) == 0) ||
                (flags & SCROLLBARS_STYLE_MASK) == SCROLLBARS_INSIDE_OVERLAY) {
                (flags & SCROLLBARS_STYLE_MASK) == SCROLLBARS_INSIDE_OVERLAY ||
                (flags & SCROLLBARS_STYLE_MASK) == SCROLLBARS_OUTSIDE_OVERLAY) {
            mPrivateFlags |= PFLAG_OPAQUE_SCROLLBARS;
        } else {
            mPrivateFlags &= ~PFLAG_OPAQUE_SCROLLBARS;