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

Commit a11d2fd9 authored by Chirayu Desai's avatar Chirayu Desai Committed by Ricardo Cerqueira
Browse files

SurfaceComposerClient: bring back getDisplayWidth, Height & Orientation

enable it with either ICS_CAMERA_BLOB or MR0_CAMERA_BLOB CFLAG

Change-Id: Ieb5d36ad2a87ed1f0aa28ae3afbd5d48c880d6ab
parent 27f431cb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -78,6 +78,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
@@ -664,6 +664,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

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

status_t ScreenshotClient::capture(