am c2091130: am 075e4c3d: Merge "SurfaceFlinger: update orientation via transactions" into ics-mr0

* commit 'c2091130ae1a1b37956f49d0fe81fb82413cd2dd':
  SurfaceFlinger: update orientation via transactions
This commit is contained in:
Jamie Gennis
2011-10-12 20:42:40 -07:00
committed by Android Git Automerger
7 changed files with 67 additions and 102 deletions

View File

@@ -5236,32 +5236,27 @@ public class WindowManagerService extends IWindowManager.Stub
startFreezingDisplayLocked(inTransaction);
mInputManager.setDisplayOrientation(0, rotation);
// NOTE: We disable the rotation in the emulator because
// it doesn't support hardware OpenGL emulation yet.
if (CUSTOM_SCREEN_ROTATION && mScreenRotationAnimation != null
&& mScreenRotationAnimation.hasScreenshot()) {
Surface.freezeDisplay(0);
if (!inTransaction) {
if (SHOW_TRANSACTIONS) Slog.i(TAG,
">>> OPEN TRANSACTION setRotationUnchecked");
Surface.openTransaction();
}
try {
if (mScreenRotationAnimation != null) {
mScreenRotationAnimation.setRotation(rotation);
}
} finally {
if (!inTransaction) {
Surface.closeTransaction();
if (SHOW_TRANSACTIONS) Slog.i(TAG,
"<<< CLOSE TRANSACTION setRotationUnchecked");
}
}
Surface.setOrientation(0, rotation);
Surface.unfreezeDisplay(0);
} else {
Surface.setOrientation(0, rotation);
if (!inTransaction) {
if (SHOW_TRANSACTIONS) Slog.i(TAG,
">>> OPEN TRANSACTION setRotationUnchecked");
Surface.openTransaction();
}
try {
// NOTE: We disable the rotation in the emulator because
// it doesn't support hardware OpenGL emulation yet.
if (CUSTOM_SCREEN_ROTATION && mScreenRotationAnimation != null
&& mScreenRotationAnimation.hasScreenshot()) {
mScreenRotationAnimation.setRotation(rotation);
}
Surface.setOrientation(0, rotation);
} finally {
if (!inTransaction) {
Surface.closeTransaction();
if (SHOW_TRANSACTIONS) Slog.i(TAG,
"<<< CLOSE TRANSACTION setRotationUnchecked");
}
}
rebuildBlackFrame(inTransaction);
for (int i=mWindows.size()-1; i>=0; i--) {