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

Commit c9d395f9 authored by Chirayu Desai's avatar Chirayu Desai Committed by Gerrit Code Review
Browse files

SurfaceComposerClient: bring back getDisplayWidth, Height & Orientation

enable it with either ICS_CAMERA_BLOB or MR0_CAMERA_BLOB CFLAG

Change-Id: Ieb5d36ad2a87ed1f0aa28ae3afbd5d48c880d6ab
parent f442ef1d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -77,6 +77,12 @@ public:
    // this legacy function (when they shouldn't).
    static status_t getDisplayInfo(int32_t displayId, DisplayInfo* info);

#if defined(ICS_CAMERA_BLOB) || defined(MR0_CAMERA_BLOB)
    static ssize_t getDisplayWidth(int32_t displayId);
    static ssize_t getDisplayHeight(int32_t displayId);
    static ssize_t getDisplayOrientation(int32_t displayId);
#endif

    // ------------------------------------------------------------------------
    // surface creation / destruction

+20 −0
Original line number Diff line number Diff line
@@ -630,6 +630,26 @@ status_t SurfaceComposerClient::getDisplayInfo(
    return getDisplayInfo(getBuiltInDisplay(displayId), info);
}

#if defined(ICS_CAMERA_BLOB) || defined(MR0_CAMERA_BLOB)
ssize_t SurfaceComposerClient::getDisplayWidth(int32_t displayId) {
    DisplayInfo info;
    getDisplayInfo(getBuiltInDisplay(displayId), &info);
    return info.w;
}

ssize_t SurfaceComposerClient::getDisplayHeight(int32_t displayId) {
    DisplayInfo info;
    getDisplayInfo(getBuiltInDisplay(displayId), &info);
    return info.h;
}

ssize_t SurfaceComposerClient::getDisplayOrientation(int32_t displayId) {
    DisplayInfo info;
    getDisplayInfo(getBuiltInDisplay(displayId), &info);
    return info.orientation;
}
#endif

// ----------------------------------------------------------------------------

ScreenshotClient::ScreenshotClient()