Loading core/java/com/android/internal/policy/DecorView.java +2 −5 Original line number Original line Diff line number Diff line Loading @@ -1631,9 +1631,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind int opacity = PixelFormat.OPAQUE; int opacity = PixelFormat.OPAQUE; final WindowConfiguration winConfig = getResources().getConfiguration().windowConfiguration; final WindowConfiguration winConfig = getResources().getConfiguration().windowConfiguration; // TODO(b/149585281) remove when root task has the correct bounds for freeform final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor; final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor && winConfig.getWindowingMode() != WINDOWING_MODE_FREEFORM; // If we draw shadows in the compositor we don't need to force the surface to be // If we draw shadows in the compositor we don't need to force the surface to be // translucent. // translucent. if (winConfig.hasWindowShadow() && !renderShadowsInCompositor) { if (winConfig.hasWindowShadow() && !renderShadowsInCompositor) { Loading Loading @@ -2427,8 +2425,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind private void updateElevation() { private void updateElevation() { final int windowingMode = final int windowingMode = getResources().getConfiguration().windowConfiguration.getWindowingMode(); getResources().getConfiguration().windowConfiguration.getWindowingMode(); final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor; && windowingMode != WINDOWING_MODE_FREEFORM; // If rendering shadows in the compositor, don't set an elevation on the view // If rendering shadows in the compositor, don't set an elevation on the view if (renderShadowsInCompositor) { if (renderShadowsInCompositor) { return; return; Loading services/core/java/com/android/server/wm/Task.java +2 −6 Original line number Original line Diff line number Diff line Loading @@ -212,7 +212,6 @@ class Task extends WindowContainer<WindowContainer> { static final int INVALID_MIN_SIZE = -1; static final int INVALID_MIN_SIZE = -1; private float mShadowRadius = 0; private float mShadowRadius = 0; private final Rect mLastSurfaceCrop = new Rect(); private final Rect mLastSurfaceCrop = new Rect(); private static final boolean ENABLE_FREEFORM_COMPOSITOR_SHADOWS = false; /** /** * The modes to control how the stack is moved to the front when calling {@link Task#reparent}. * The modes to control how the stack is moved to the front when calling {@link Task#reparent}. Loading Loading @@ -2729,10 +2728,8 @@ class Task extends WindowContainer<WindowContainer> { } } private void updateSurfaceCrop() { private void updateSurfaceCrop() { // TODO(b/149585281) remove when root task has the correct bounds for freeform // Only update the crop if we are drawing shadows on the task. // Only update the crop if we are drawing shadows on the task. if (mSurfaceControl == null || !mWmService.mRenderShadowsInCompositor if (mSurfaceControl == null || !mWmService.mRenderShadowsInCompositor || !isRootTask()) { || !isRootTask() || !ENABLE_FREEFORM_COMPOSITOR_SHADOWS) { return; return; } } Loading Loading @@ -4273,8 +4270,7 @@ class Task extends WindowContainer<WindowContainer> { // Get elevation for a specific windowing mode. // Get elevation for a specific windowing mode. if (inPinnedWindowingMode()) { if (inPinnedWindowingMode()) { elevation = PINNED_WINDOWING_MODE_ELEVATION_IN_DIP; elevation = PINNED_WINDOWING_MODE_ELEVATION_IN_DIP; } else if (ENABLE_FREEFORM_COMPOSITOR_SHADOWS && inFreeformWindowingMode()) { } else if (inFreeformWindowingMode()) { // TODO(b/149585281) remove when root task has the correct bounds for freeform elevation = taskIsFocused elevation = taskIsFocused ? DECOR_SHADOW_FOCUSED_HEIGHT_IN_DIP : DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP; ? DECOR_SHADOW_FOCUSED_HEIGHT_IN_DIP : DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP; } else { } else { Loading Loading
core/java/com/android/internal/policy/DecorView.java +2 −5 Original line number Original line Diff line number Diff line Loading @@ -1631,9 +1631,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind int opacity = PixelFormat.OPAQUE; int opacity = PixelFormat.OPAQUE; final WindowConfiguration winConfig = getResources().getConfiguration().windowConfiguration; final WindowConfiguration winConfig = getResources().getConfiguration().windowConfiguration; // TODO(b/149585281) remove when root task has the correct bounds for freeform final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor; final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor && winConfig.getWindowingMode() != WINDOWING_MODE_FREEFORM; // If we draw shadows in the compositor we don't need to force the surface to be // If we draw shadows in the compositor we don't need to force the surface to be // translucent. // translucent. if (winConfig.hasWindowShadow() && !renderShadowsInCompositor) { if (winConfig.hasWindowShadow() && !renderShadowsInCompositor) { Loading Loading @@ -2427,8 +2425,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind private void updateElevation() { private void updateElevation() { final int windowingMode = final int windowingMode = getResources().getConfiguration().windowConfiguration.getWindowingMode(); getResources().getConfiguration().windowConfiguration.getWindowingMode(); final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor; && windowingMode != WINDOWING_MODE_FREEFORM; // If rendering shadows in the compositor, don't set an elevation on the view // If rendering shadows in the compositor, don't set an elevation on the view if (renderShadowsInCompositor) { if (renderShadowsInCompositor) { return; return; Loading
services/core/java/com/android/server/wm/Task.java +2 −6 Original line number Original line Diff line number Diff line Loading @@ -212,7 +212,6 @@ class Task extends WindowContainer<WindowContainer> { static final int INVALID_MIN_SIZE = -1; static final int INVALID_MIN_SIZE = -1; private float mShadowRadius = 0; private float mShadowRadius = 0; private final Rect mLastSurfaceCrop = new Rect(); private final Rect mLastSurfaceCrop = new Rect(); private static final boolean ENABLE_FREEFORM_COMPOSITOR_SHADOWS = false; /** /** * The modes to control how the stack is moved to the front when calling {@link Task#reparent}. * The modes to control how the stack is moved to the front when calling {@link Task#reparent}. Loading Loading @@ -2729,10 +2728,8 @@ class Task extends WindowContainer<WindowContainer> { } } private void updateSurfaceCrop() { private void updateSurfaceCrop() { // TODO(b/149585281) remove when root task has the correct bounds for freeform // Only update the crop if we are drawing shadows on the task. // Only update the crop if we are drawing shadows on the task. if (mSurfaceControl == null || !mWmService.mRenderShadowsInCompositor if (mSurfaceControl == null || !mWmService.mRenderShadowsInCompositor || !isRootTask()) { || !isRootTask() || !ENABLE_FREEFORM_COMPOSITOR_SHADOWS) { return; return; } } Loading Loading @@ -4273,8 +4270,7 @@ class Task extends WindowContainer<WindowContainer> { // Get elevation for a specific windowing mode. // Get elevation for a specific windowing mode. if (inPinnedWindowingMode()) { if (inPinnedWindowingMode()) { elevation = PINNED_WINDOWING_MODE_ELEVATION_IN_DIP; elevation = PINNED_WINDOWING_MODE_ELEVATION_IN_DIP; } else if (ENABLE_FREEFORM_COMPOSITOR_SHADOWS && inFreeformWindowingMode()) { } else if (inFreeformWindowingMode()) { // TODO(b/149585281) remove when root task has the correct bounds for freeform elevation = taskIsFocused elevation = taskIsFocused ? DECOR_SHADOW_FOCUSED_HEIGHT_IN_DIP : DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP; ? DECOR_SHADOW_FOCUSED_HEIGHT_IN_DIP : DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP; } else { } else { Loading