Merge "Remove single pass actions from display loop." into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
34a75df635
@@ -212,5 +212,12 @@ class DimAnimator {
|
|||||||
mDimHeight = dimHeight;
|
mDimHeight = dimHeight;
|
||||||
mDimTarget = dimTarget;
|
mDimTarget = dimTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Parameters(Parameters o) {
|
||||||
|
mDimWinAnimator = o.mDimWinAnimator;
|
||||||
|
mDimWidth = o.mDimWidth;
|
||||||
|
mDimHeight = o.mDimHeight;
|
||||||
|
mDimTarget = o.mDimTarget;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ public class WindowAnimator {
|
|||||||
// Set the new DimAnimator params.
|
// Set the new DimAnimator params.
|
||||||
DimAnimator.Parameters dimParams = layoutToAnim.mDimParams;
|
DimAnimator.Parameters dimParams = layoutToAnim.mDimParams;
|
||||||
if (dimParams == null) {
|
if (dimParams == null) {
|
||||||
mDimParams = dimParams;
|
mDimParams = null;
|
||||||
} else {
|
} else {
|
||||||
final WindowStateAnimator newWinAnimator = dimParams.mDimWinAnimator;
|
final WindowStateAnimator newWinAnimator = dimParams.mDimWinAnimator;
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ public class WindowAnimator {
|
|||||||
if (newWinAnimator.mSurfaceShown &&
|
if (newWinAnimator.mSurfaceShown &&
|
||||||
(existingDimWinAnimator == null || !existingDimWinAnimator.mSurfaceShown
|
(existingDimWinAnimator == null || !existingDimWinAnimator.mSurfaceShown
|
||||||
|| existingDimWinAnimator.mAnimLayer < newWinAnimator.mAnimLayer)) {
|
|| existingDimWinAnimator.mAnimLayer < newWinAnimator.mAnimLayer)) {
|
||||||
mDimParams = dimParams;
|
mDimParams = new DimAnimator.Parameters(dimParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -559,15 +559,6 @@ public class WindowAnimator {
|
|||||||
private void performAnimationsLocked(final WinAnimatorList winAnimatorList) {
|
private void performAnimationsLocked(final WinAnimatorList winAnimatorList) {
|
||||||
updateWindowsLocked(winAnimatorList);
|
updateWindowsLocked(winAnimatorList);
|
||||||
updateWallpaperLocked(winAnimatorList);
|
updateWallpaperLocked(winAnimatorList);
|
||||||
|
|
||||||
for (int i = mPendingLayoutChanges.size() - 1; i >= 0; i--) {
|
|
||||||
if ((mPendingLayoutChanges.valueAt(i)
|
|
||||||
& WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER) != 0) {
|
|
||||||
mPendingActions |= WALLPAPER_ACTION_PENDING;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testTokenMayBeDrawnLocked();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(cmautner): Change the following comment when no longer locked on mWindowMap */
|
// TODO(cmautner): Change the following comment when no longer locked on mWindowMap */
|
||||||
@@ -576,12 +567,7 @@ public class WindowAnimator {
|
|||||||
if (!mInitialized) {
|
if (!mInitialized) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int i = mWinAnimatorLists.size() - 1; i >= 0; i--) {
|
|
||||||
animateLocked(mWinAnimatorLists.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void animateLocked(final WinAnimatorList winAnimatorList) {
|
|
||||||
mPendingLayoutChanges.clear();
|
mPendingLayoutChanges.clear();
|
||||||
mCurrentTime = SystemClock.uptimeMillis();
|
mCurrentTime = SystemClock.uptimeMillis();
|
||||||
mBulkUpdateParams = SET_ORIENTATION_CHANGE_COMPLETE;
|
mBulkUpdateParams = SET_ORIENTATION_CHANGE_COMPLETE;
|
||||||
@@ -591,25 +577,31 @@ public class WindowAnimator {
|
|||||||
Slog.i(TAG, "!!! animate: entry time=" + mCurrentTime);
|
Slog.i(TAG, "!!! animate: entry time=" + mCurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update animations of all applications, including those
|
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(
|
||||||
// associated with exiting/removed apps
|
TAG, ">>> OPEN TRANSACTION animateLocked");
|
||||||
Surface.openTransaction();
|
Surface.openTransaction();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
updateWindowsAppsAndRotationAnimationsLocked();
|
updateWindowsAppsAndRotationAnimationsLocked();
|
||||||
performAnimationsLocked(winAnimatorList);
|
|
||||||
|
|
||||||
// THIRD LOOP: Update the surfaces of all windows.
|
for (int i = mWinAnimatorLists.size() - 1; i >= 0; i--) {
|
||||||
|
final WinAnimatorList winAnimatorList = mWinAnimatorLists.get(i);
|
||||||
|
|
||||||
|
// Update animations of all applications, including those
|
||||||
|
// associated with exiting/removed apps
|
||||||
|
performAnimationsLocked(winAnimatorList);
|
||||||
|
|
||||||
|
final int N = winAnimatorList.size();
|
||||||
|
for (int j = 0; j < N; j++) {
|
||||||
|
winAnimatorList.get(j).prepareSurfaceLocked(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
testTokenMayBeDrawnLocked();
|
||||||
|
|
||||||
if (mScreenRotationAnimation != null) {
|
if (mScreenRotationAnimation != null) {
|
||||||
mScreenRotationAnimation.updateSurfacesInTransaction();
|
mScreenRotationAnimation.updateSurfacesInTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
final int N = winAnimatorList.size();
|
|
||||||
for (int i = 0; i < N; i++) {
|
|
||||||
winAnimatorList.get(i).prepareSurfaceLocked(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mDimParams != null) {
|
if (mDimParams != null) {
|
||||||
mDimAnimator.updateParameters(mContext.getResources(), mDimParams, mCurrentTime);
|
mDimAnimator.updateParameters(mContext.getResources(), mDimParams, mCurrentTime);
|
||||||
}
|
}
|
||||||
@@ -634,6 +626,15 @@ public class WindowAnimator {
|
|||||||
Log.wtf(TAG, "Unhandled exception in Window Manager", e);
|
Log.wtf(TAG, "Unhandled exception in Window Manager", e);
|
||||||
} finally {
|
} finally {
|
||||||
Surface.closeTransaction();
|
Surface.closeTransaction();
|
||||||
|
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(
|
||||||
|
TAG, "<<< CLOSE TRANSACTION animateLocked");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = mPendingLayoutChanges.size() - 1; i >= 0; i--) {
|
||||||
|
if ((mPendingLayoutChanges.valueAt(i)
|
||||||
|
& WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER) != 0) {
|
||||||
|
mPendingActions |= WALLPAPER_ACTION_PENDING;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mBulkUpdateParams != 0 || mPendingLayoutChanges.size() > 0) {
|
if (mBulkUpdateParams != 0 || mPendingLayoutChanges.size() > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user