Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 833eb91c authored by Bumble-Bee's avatar Bumble-Bee Committed by Ricardo Cerqueira
Browse files

Add setOrientation back

	this is needed for some tegra ICS and JB_MR0 prebuilts
parent 1083d5ad
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -113,6 +113,8 @@ public:
    //! 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();

+14 −0
Original line number Diff line number Diff line
@@ -421,6 +421,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()
@@ -605,6 +614,11 @@ status_t SurfaceComposerClient::setMatrix(const sp<IBinder>& id, float dsdx, flo
    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,