summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewRootImpl.java
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2018-03-06 18:19:45 +0100
committerAdrian Roos <roosa@google.com>2018-03-07 16:53:54 +0100
commit9e370f2912620a4f3239cb58d2bce23a58f78cd6 (patch)
tree837a268b887d12a94f903321c9fc575373c67d2f /core/java/android/view/ViewRootImpl.java
parent999e97f405b8f01b12a6fb8e844d33dc807813fa (diff)
Window: Provide frame size hint to ViewRootImpl
Provides a better estimate to the ViewRootImpl about the likely window frame size than it can get from the configuration, which allows it to avoid unneccessary measure passes. Bug: 73813813 Test: atest PhoneWindowManagerLayoutTest Change-Id: Ia4de6509416d90eed61929ce1646904c31afdd8d
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
-rw-r--r--core/java/android/view/ViewRootImpl.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 95e4abb648b4..d908e7979cf7 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -753,7 +753,7 @@ public final class ViewRootImpl implements ViewParent,
mAttachInfo.mRecomputeGlobalAttributes = true;
collectViewAttributes();
res = mWindowSession.addToDisplay(mWindow, mSeq, mWindowAttributes,
- getHostVisibility(), mDisplay.getDisplayId(),
+ getHostVisibility(), mDisplay.getDisplayId(), mWinFrame,
mAttachInfo.mContentInsets, mAttachInfo.mStableInsets,
mAttachInfo.mOutsets, mAttachInfo.mDisplayCutout, mInputChannel);
} catch (RemoteException e) {
@@ -1711,8 +1711,8 @@ public final class ViewRootImpl implements ViewParent,
desiredWindowWidth = size.x;
desiredWindowHeight = size.y;
} else {
- desiredWindowWidth = dipToPx(config.screenWidthDp);
- desiredWindowHeight = dipToPx(config.screenHeightDp);
+ desiredWindowWidth = mWinFrame.width();
+ desiredWindowHeight = mWinFrame.height();
}
// We used to use the following condition to choose 32 bits drawing caches: