Permalink
Browse files

Add setOrientation back

	this is needed for some tegra ICS and JB_MR0 prebuilts
  • Loading branch information...
1 parent 7849bce commit 6b47c644429453452ace7747d3fe1aed1b9f43b7 @BuzzBumbleBee BuzzBumbleBee committed with Bajee11 Nov 29, 2012
Showing with 16 additions and 0 deletions.
  1. +2 −0 include/gui/SurfaceComposerClient.h
  2. +14 −0 libs/gui/SurfaceComposerClient.cpp
@@ -109,6 +109,8 @@ class SurfaceComposerClient : public RefBase
//! Close a composer transaction on all active SurfaceComposerClients.
static void closeGlobalTransaction(bool synchronous = false);
+ static int setOrientation(int32_t dpy, int orientation, uint32_t flags);
+
//! Flag the currently open transaction as an animation transaction.
static void setAnimationTransaction();
@@ -393,6 +393,15 @@ void Composer::setDisplayProjection(const sp<IBinder>& token,
mForceSynchronous = true; // TODO: do we actually still need this?
}
+status_t Composer::setOrientation(int orientation) {
+ sp<ISurfaceComposer> sm(ComposerService::getComposerService());
+ sp<IBinder> token(sm->getBuiltInDisplay(ISurfaceComposer::eDisplayIdMain));
+ DisplayState& s(getDisplayStateLocked(token));
+ s.orientation = orientation;
+ mForceSynchronous = true; // TODO: do we actually still need this?
+ return NO_ERROR;
+}
+
// ---------------------------------------------------------------------------
SurfaceComposerClient::SurfaceComposerClient()
@@ -571,6 +580,11 @@ status_t SurfaceComposerClient::setMatrix(SurfaceID id, float dsdx, float dtdx,
return getComposer().setMatrix(this, id, dsdx, dtdx, dsdy, dtdy);
}
+status_t SurfaceComposerClient::setOrientation(int32_t dpy, int orientation, uint32_t flags)
+{
+ return Composer::getInstance().setOrientation(orientation);
+}
+
// ----------------------------------------------------------------------------
void SurfaceComposerClient::setDisplaySurface(const sp<IBinder>& token,

0 comments on commit 6b47c64

Please sign in to comment.