diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index d91a7915..00000000 100755 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -5454,10 +5454,19 @@ class WindowState extends WindowContainer implements WindowManagerP } private void applyDims() { + // Passenger Control uses a large translucent dialog. On msm8974, placing an HWC2 + // solid-color dim effect between that dialog and its activity forces the complete + // display through the legacy GLES client target. This drops scrolling to a few frames + // per second and was also the trigger for the black/white corner corruption. Keep the + // normal HWC protection for every other window, but omit this one optional backdrop so + // the application's two buffered windows can stay on the MDP fast path. + final boolean suppressPassengerControlDim = + "ru.monjaro.passengercontrol.client".equals(mAttrs.packageName); if (!mAnimatingExit && mAppDied) { mIsDimming = true; getDimmer().dimAbove(getSyncTransaction(), this, DEFAULT_DIM_AMOUNT_DEAD_WINDOW); - } else if (((mAttrs.flags & FLAG_DIM_BEHIND) != 0 || shouldDrawBlurBehind()) + } else if (!suppressPassengerControlDim + && ((mAttrs.flags & FLAG_DIM_BEHIND) != 0 || shouldDrawBlurBehind()) && isVisibleNow() && !mHidden) { // Only show the Dimmer when the following is satisfied: // 1. The window has the flag FLAG_DIM_BEHIND or blur behind is requested