diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-02-16 16:08:54 +0100 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-02-16 16:08:54 +0100 |
commit | 87a0bfdfa8184d072c86cb9183a8438f2dd4150d (patch) | |
tree | 564f7fb77f416fc55a936df5b97d954eef512d6d /core/java/android/view | |
parent | 421d6ad191563308d31594f53fee804c3d4d1f84 (diff) | |
download | frameworks_base-87a0bfdfa8184d072c86cb9183a8438f2dd4150d.zip frameworks_base-87a0bfdfa8184d072c86cb9183a8438f2dd4150d.tar.gz frameworks_base-87a0bfdfa8184d072c86cb9183a8438f2dd4150d.tar.bz2 |
Do not forceLayout when window is resized
WindowManager uses a resize message when forcing a window to be
redrawn, which then triggered a full layout pass, which is
excessive and unnecessary. A normal requestLayout() should suffice
for this case.
Bug: 18573811
Change-Id: I1e9ef807094b1e0afb32d13fd68b67c3957b15c3
Diffstat (limited to 'core/java/android/view')
-rw-r--r-- | core/java/android/view/ViewRootImpl.java | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 24fae8a..0a30d0c 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -3080,17 +3080,6 @@ public final class ViewRootImpl implements ViewParent, return (theParent instanceof ViewGroup) && isViewDescendantOf((View) theParent, parent); } - private static void forceLayout(View view) { - view.forceLayout(); - if (view instanceof ViewGroup) { - ViewGroup group = (ViewGroup) view; - final int count = group.getChildCount(); - for (int i = 0; i < count; i++) { - forceLayout(group.getChildAt(i)); - } - } - } - private final static int MSG_INVALIDATE = 1; private final static int MSG_INVALIDATE_RECT = 2; private final static int MSG_DIE = 3; @@ -3224,10 +3213,6 @@ public final class ViewRootImpl implements ViewParent, mReportNextDraw = true; } - if (mView != null) { - forceLayout(mView); - } - requestLayout(); } break; @@ -3242,9 +3227,6 @@ public final class ViewRootImpl implements ViewParent, mWinFrame.top = t; mWinFrame.bottom = t + h; - if (mView != null) { - forceLayout(mView); - } requestLayout(); } break; |