summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--libs/surfaceflinger/SurfaceFlinger.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index 242d026..c2adf07 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -656,6 +656,7 @@ void SurfaceFlinger::handleTransaction(uint32_t transactionFlags)
const int dpy = 0;
const int orientation = mCurrentState.orientation;
+ const uint32_t type = mCurrentState.orientationType;
GraphicPlane& plane(graphicPlane(dpy));
plane.setOrientation(orientation);
@@ -674,8 +675,8 @@ void SurfaceFlinger::handleTransaction(uint32_t transactionFlags)
mVisibleRegionsDirty = true;
mDirtyRegion.set(hw.bounds());
-
- mOrientationAnimation->onOrientationChanged();
+ mFreezeDisplayTime = 0;
+ mOrientationAnimation->onOrientationChanged(type);
}
if (mCurrentState.freezeDisplay != mDrawingState.freezeDisplay) {
@@ -1202,7 +1203,8 @@ status_t SurfaceFlinger::unfreezeDisplay(DisplayID dpy, uint32_t flags)
return NO_ERROR;
}
-int SurfaceFlinger::setOrientation(DisplayID dpy, int orientation)
+int SurfaceFlinger::setOrientation(DisplayID dpy,
+ int orientation, uint32_t flags)
{
if (UNLIKELY(uint32_t(dpy) >= DISPLAY_COUNT))
return BAD_VALUE;
@@ -1210,6 +1212,7 @@ int SurfaceFlinger::setOrientation(DisplayID dpy, int orientation)
Mutex::Autolock _l(mStateLock);
if (mCurrentState.orientation != orientation) {
if (uint32_t(orientation)<=eOrientation270 || orientation==42) {
+ mCurrentState.orientationType = flags;
mCurrentState.orientation = orientation;
setTransactionFlags(eTransactionNeeded);
mTransactionCV.wait(mStateLock);
@@ -1805,6 +1808,7 @@ status_t GraphicPlane::setOrientation(int orientation)
if (orientation == ISurfaceComposer::eOrientationDefault) {
// make sure the default orientation is optimal
mOrientationTransform.reset();
+ mOrientation = orientation;
mGlobalTransform = mTransform;
return NO_ERROR;
}
@@ -1825,7 +1829,7 @@ status_t GraphicPlane::setOrientation(int orientation)
GraphicPlane::orientationToTransfrom(orientation, w, h,
&mOrientationTransform);
}
-
+ mOrientation = orientation;
mGlobalTransform = mOrientationTransform * mTransform;
return NO_ERROR;
}