Merge changes I28ac9a2d,I8ecc88b6 into sc-dev
* changes: WindowStateAnimator: Move HScale/VScale application to WindowState WinodowStateAnimator: Remove mD(s|t)d(x|y)
This commit is contained in:
committed by
Android (Google) Code Review
commit
6b2d6fbea5
@@ -193,6 +193,12 @@
|
||||
"group": "WM_ERROR",
|
||||
"at": "com\/android\/server\/wm\/WindowManagerService.java"
|
||||
},
|
||||
"-1906387645": {
|
||||
"message": "SURFACE controller=%s alpha=%f HScale=%f, VScale=%f: %s",
|
||||
"level": "INFO",
|
||||
"group": "WM_SHOW_TRANSACTIONS",
|
||||
"at": "com\/android\/server\/wm\/WindowStateAnimator.java"
|
||||
},
|
||||
"-1905191109": {
|
||||
"message": "SyncGroup %d: Finished!",
|
||||
"level": "VERBOSE",
|
||||
@@ -3283,12 +3289,6 @@
|
||||
"group": "WM_DEBUG_ORIENTATION",
|
||||
"at": "com\/android\/server\/wm\/ActivityRecord.java"
|
||||
},
|
||||
"1747941491": {
|
||||
"message": "SURFACE controller=%s alpha=%f matrix=[%f*%f,%f*%f][%f*%f,%f*%f]: %s",
|
||||
"level": "INFO",
|
||||
"group": "WM_SHOW_TRANSACTIONS",
|
||||
"at": "com\/android\/server\/wm\/WindowStateAnimator.java"
|
||||
},
|
||||
"1756082882": {
|
||||
"message": "Orientation change skips hidden %s",
|
||||
"level": "VERBOSE",
|
||||
|
||||
@@ -5185,10 +5185,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
* @param outMatrix Matrix to fill in the transformation.
|
||||
*/
|
||||
void getTransformationMatrix(float[] float9, Matrix outMatrix) {
|
||||
float9[Matrix.MSCALE_X] = mWinAnimator.mDsDx;
|
||||
float9[Matrix.MSKEW_Y] = mWinAnimator.mDtDx;
|
||||
float9[Matrix.MSKEW_X] = mWinAnimator.mDtDy;
|
||||
float9[Matrix.MSCALE_Y] = mWinAnimator.mDsDy;
|
||||
float9[Matrix.MSCALE_X] = mGlobalScale;
|
||||
float9[Matrix.MSKEW_Y] = 0;
|
||||
float9[Matrix.MSKEW_X] = 0;
|
||||
float9[Matrix.MSCALE_Y] = mGlobalScale;
|
||||
transformSurfaceInsetsPosition(mTmpPoint, mAttrs.surfaceInsets);
|
||||
int x = mSurfacePosition.x + mTmpPoint.x;
|
||||
int y = mSurfacePosition.y + mTmpPoint.y;
|
||||
@@ -5364,11 +5364,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
}
|
||||
}
|
||||
|
||||
private void updateGlobalScaleIfNeeded() {
|
||||
if (mLastGlobalScale != mGlobalScale) {
|
||||
private void updateScaleIfNeeded() {
|
||||
if (mLastGlobalScale != mGlobalScale || mLastHScale != mHScale ||
|
||||
mLastVScale != mVScale ) {
|
||||
getPendingTransaction().setMatrix(getSurfaceControl(),
|
||||
mGlobalScale, 0, 0, mGlobalScale);
|
||||
mGlobalScale*mHScale, 0, 0, mGlobalScale*mVScale);
|
||||
mLastGlobalScale = mGlobalScale;
|
||||
mLastHScale = mHScale;
|
||||
mLastVScale = mVScale;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5379,7 +5382,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
updateSurfacePositionNonOrganized();
|
||||
// Send information to SurfaceFlinger about the priority of the current window.
|
||||
updateFrameRateSelectionPriorityIfNeeded();
|
||||
if (isVisibleRequested()) updateGlobalScaleIfNeeded();
|
||||
if (isVisibleRequested()) updateScaleIfNeeded();
|
||||
|
||||
mWinAnimator.prepareSurfaceLocked(getSyncTransaction());
|
||||
super.prepareSurfaces();
|
||||
|
||||
@@ -125,11 +125,6 @@ class WindowStateAnimator {
|
||||
*/
|
||||
private final Rect mSystemDecorRect = new Rect();
|
||||
|
||||
float mDsDx=1, mDtDx=0, mDsDy=0, mDtDy=1;
|
||||
private float mLastDsDx=1, mLastDtDx=0, mLastDsDy=0, mLastDtDy=1;
|
||||
|
||||
boolean mHaveMatrix;
|
||||
|
||||
// Set to true if, when the window gets displayed, it should perform
|
||||
// an enter animation.
|
||||
boolean mEnterAnimationPending;
|
||||
@@ -478,11 +473,6 @@ class WindowStateAnimator {
|
||||
}
|
||||
|
||||
mShownAlpha = mAlpha;
|
||||
mHaveMatrix = false;
|
||||
mDsDx = 1;
|
||||
mDtDx = 0;
|
||||
mDtDy = 0;
|
||||
mDsDy = 1;
|
||||
}
|
||||
|
||||
private boolean isInBlastSync() {
|
||||
@@ -519,13 +509,6 @@ class WindowStateAnimator {
|
||||
int yOffset = mYOffset;
|
||||
if (!mIsWallpaper) {
|
||||
mSurfaceController.setPosition(t, xOffset, yOffset);
|
||||
// Wallpaper is already updated above when calling setWallpaperPositionAndScale so
|
||||
// we only need to consider the non-wallpaper case here.
|
||||
mSurfaceController.setMatrix(t,
|
||||
mDsDx * w.mHScale,
|
||||
mDtDx * w.mVScale,
|
||||
mDtDy * w.mHScale,
|
||||
mDsDy * w.mVScale);
|
||||
} else {
|
||||
setWallpaperPositionAndScale(t, xOffset, yOffset, mWallpaperScale);
|
||||
}
|
||||
@@ -585,25 +568,12 @@ class WindowStateAnimator {
|
||||
"Orientation change skips hidden %s", w);
|
||||
}
|
||||
} else if (mLastAlpha != mShownAlpha
|
||||
|| mLastDsDx != mDsDx
|
||||
|| mLastDtDx != mDtDx
|
||||
|| mLastDsDy != mDsDy
|
||||
|| mLastDtDy != mDtDy
|
||||
|| w.mLastHScale != w.mHScale
|
||||
|| w.mLastVScale != w.mVScale
|
||||
|| mLastHidden) {
|
||||
displayed = true;
|
||||
mLastAlpha = mShownAlpha;
|
||||
mLastDsDx = mDsDx;
|
||||
mLastDtDx = mDtDx;
|
||||
mLastDsDy = mDsDy;
|
||||
mLastDtDy = mDtDy;
|
||||
w.mLastHScale = w.mHScale;
|
||||
w.mLastVScale = w.mVScale;
|
||||
ProtoLog.i(WM_SHOW_TRANSACTIONS,
|
||||
"SURFACE controller=%s alpha=%f matrix=[%f*%f,%f*%f][%f*%f,%f*%f]: %s",
|
||||
mSurfaceController, mShownAlpha, mDsDx, w.mHScale, mDtDx, w.mVScale,
|
||||
mDtDy, w.mHScale, mDsDy, w.mVScale, w);
|
||||
"SURFACE controller=%s alpha=%f HScale=%f, VScale=%f: %s",
|
||||
mSurfaceController, mShownAlpha, w.mHScale, w.mVScale, w);
|
||||
|
||||
boolean prepared = true;
|
||||
|
||||
@@ -611,12 +581,7 @@ class WindowStateAnimator {
|
||||
setWallpaperPositionAndScale(t, mXOffset, mYOffset, mWallpaperScale);
|
||||
} else {
|
||||
prepared =
|
||||
mSurfaceController.prepareToShowInTransaction(t, mShownAlpha,
|
||||
mDsDx * w.mHScale,
|
||||
mDtDx * w.mVScale,
|
||||
mDtDy * w.mHScale,
|
||||
mDsDy * w.mVScale
|
||||
);
|
||||
mSurfaceController.prepareToShowInTransaction(t, mShownAlpha);
|
||||
}
|
||||
|
||||
if (prepared && mDrawState == HAS_DRAWN) {
|
||||
@@ -711,11 +676,10 @@ class WindowStateAnimator {
|
||||
|
||||
mSurfaceController.setPosition(t,mWin.mTmpMatrixArray[MTRANS_X],
|
||||
mWin.mTmpMatrixArray[MTRANS_Y]);
|
||||
mSurfaceController.setMatrix(t,
|
||||
mDsDx * mWin.mTmpMatrixArray[MSCALE_X] * mWin.mHScale,
|
||||
mDtDx * mWin.mTmpMatrixArray[MSKEW_Y] * mWin.mVScale,
|
||||
mDtDy * mWin.mTmpMatrixArray[MSKEW_X] * mWin.mHScale,
|
||||
mDsDy * mWin.mTmpMatrixArray[MSCALE_Y] * mWin.mVScale);
|
||||
mSurfaceController.setMatrix(t, mWin.mTmpMatrixArray[MSCALE_X],
|
||||
mWin.mTmpMatrixArray[MSKEW_Y],
|
||||
mWin.mTmpMatrixArray[MSKEW_X],
|
||||
mWin.mTmpMatrixArray[MSCALE_Y]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -917,12 +881,8 @@ class WindowStateAnimator {
|
||||
pw.print(" mAlpha="); pw.print(mAlpha);
|
||||
pw.print(" mLastAlpha="); pw.println(mLastAlpha);
|
||||
}
|
||||
if (mHaveMatrix || mWin.mGlobalScale != 1) {
|
||||
if (mWin.mGlobalScale != 1) {
|
||||
pw.print(prefix); pw.print("mGlobalScale="); pw.print(mWin.mGlobalScale);
|
||||
pw.print(" mDsDx="); pw.print(mDsDx);
|
||||
pw.print(" mDtDx="); pw.print(mDtDx);
|
||||
pw.print(" mDtDy="); pw.print(mDtDy);
|
||||
pw.print(" mDsDy="); pw.println(mDsDy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -178,19 +178,13 @@ class WindowSurfaceController {
|
||||
t.setMatrix(mSurfaceControl, dsdx, dtdx, dtdy, dsdy);
|
||||
}
|
||||
|
||||
boolean prepareToShowInTransaction(SurfaceControl.Transaction t, float alpha, float dsdx,
|
||||
float dtdx, float dsdy, float dtdy) {
|
||||
boolean prepareToShowInTransaction(SurfaceControl.Transaction t, float alpha) {
|
||||
if (mSurfaceControl == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
mSurfaceAlpha = alpha;
|
||||
t.setAlpha(mSurfaceControl, alpha);
|
||||
mLastDsdx = dsdx;
|
||||
mLastDtdx = dtdx;
|
||||
mLastDsdy = dsdy;
|
||||
mLastDtdy = dtdy;
|
||||
t.setMatrix(mSurfaceControl, dsdx, dtdx, dsdy, dtdy);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user