Commit 68497996 authored by Ted Choc's avatar Ted Choc Committed by Commit Bot

Fix compositor sizing of OnePlus in fullscreen mode.

BUG=854109

Change-Id: Iac8a8b5c947d890a17b187f1cded75332b3dba27
Reviewed-on: https://chromium-review.googlesource.com/1110517Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569395}
parent c2e22fc8
......@@ -257,7 +257,11 @@ public class CompositorViewHolder extends FrameLayout
// [1] - https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_FULLSCREEN
if (mSystemUiFullscreen) {
getWindowVisibleDisplayFrame(mCacheRect);
return mCacheRect.width();
// On certain devices, getWindowVisibleDisplayFrame is larger than the screen size, so
// this ensures we never draw beyond the underlying dimensions of the view.
// https://crbug.com/854109
return Math.min(mCacheRect.width(), getWidth());
} else {
return getWidth();
}
......@@ -267,7 +271,7 @@ public class CompositorViewHolder extends FrameLayout
// See comment in getWidthForViewport() for an explainer of why this is done.
if (mSystemUiFullscreen) {
getWindowVisibleDisplayFrame(mCacheRect);
return mCacheRect.height();
return Math.min(mCacheRect.height(), getHeight());
} else {
return getHeight();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment