summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2012-07-24 20:43:54 -0700
committer Mathias Agopian <mathias@google.com> 2012-07-24 20:43:54 -0700
commit8b33f032327f8de0dcc0e6d0d43ed80f834b51f6 (patch)
treed6228a0088740fe5f5c73f405f353bffd121bbae /services/surfaceflinger/SurfaceFlinger.cpp
parent921e6ac4b7610a178285898d191eb0e3afe906c0 (diff)
update SF binder protocol to support setting display attributes
no change of functionality -- the old behavior is implemented on top of this new protocol. this new protocol will allow, eventually, to pass informations about displays and layer stacks. Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index ad3865ed0e..8da2543da7 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -143,7 +143,11 @@ void SurfaceFlinger::binderDied(const wp<IBinder>& who)
// reset screen orientation
Vector<ComposerState> state;
- setTransactionState(state, eOrientationDefault, 0);
+ Vector<DisplayState> displays;
+ DisplayState d;
+ d.orientation = eOrientationDefault;
+ displays.add(d);
+ setTransactionState(state, displays, 0);
// restart the boot-animation
startBootAnim();
@@ -1325,10 +1329,19 @@ uint32_t SurfaceFlinger::setTransactionFlags(uint32_t flags)
}
-void SurfaceFlinger::setTransactionState(const Vector<ComposerState>& state,
- int orientation, uint32_t flags) {
+void SurfaceFlinger::setTransactionState(
+ const Vector<ComposerState>& state,
+ const Vector<DisplayState>& displays,
+ uint32_t flags)
+{
Mutex::Autolock _l(mStateLock);
+ int orientation = eOrientationUnchanged;
+ if (displays.size()) {
+ // TODO: handle all displays
+ orientation = displays[0].orientation;
+ }
+
uint32_t transactionFlags = 0;
if (mCurrentState.orientation != orientation) {
if (uint32_t(orientation)<=eOrientation270 || orientation==42) {