diff options
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 3 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowState.java | 12 |
2 files changed, 11 insertions, 4 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index ea42399a07eb..d80c6a35836f 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -5659,7 +5659,8 @@ public final class ViewRootImpl implements ViewParent, if (DEBUG_LAYOUT) Log.v(TAG, "Resizing " + this + ": frame=" + frame.toShortString() + " contentInsets=" + contentInsets.toShortString() + " visibleInsets=" + visibleInsets.toShortString() - + " reportDraw=" + reportDraw); + + " reportDraw=" + reportDraw + + " backDropFrame=" + backDropFrame); // Tell all listeners that we are resizing the window so that the chrome can get // updated as fast as possible on a separate thread, diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 6d05921c386c..a7aa9e14a6e4 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1886,10 +1886,16 @@ final class WindowState implements WindowManagerPolicy.WindowState { Configuration newConfig) throws RemoteException { DisplayInfo displayInfo = getDisplayInfo(); mTmpRect.set(0, 0, displayInfo.logicalWidth, displayInfo.logicalHeight); - boolean resizing = computeDragResizing(); + // When the task is docked, we send fullscreen sized backDropFrame as soon as resizing + // start even if we haven't received the relayout window, so that the client requests + // the relayout sooner. When dragging stops, backDropFrame needs to stay fullscreen + // until the window to small size, otherwise the multithread renderer will shift last + // one or more frame to wrong offset. So here we send fullscreen backdrop if either + // isDragResizing() or isDragResizeChanged() is true. + boolean resizing = isDragResizing() || isDragResizeChanged(); + final Rect backDropFrame = (inFreeformWorkspace() || !resizing) ? frame : mTmpRect; mClient.resized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets, - outsets, reportDraw, newConfig, inFreeformWorkspace() || !resizing - ? frame : mTmpRect); + outsets, reportDraw, newConfig, backDropFrame); } public void registerFocusObserver(IWindowFocusObserver observer) { |