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

Commit 635cfc65 authored by Sungtak Lee's avatar Sungtak Lee
Browse files

GraphicBufferSource: add configure() with 32bit consumerUsage flag

Old vendor partition may have references to old
GraphicBufferSource::configure() and/or
OmxGraphicBufferSource::configure() with 32bit consumerUsage flag.
Retain configure() with 32bit consumerUsage flag for GraphicBufferSource
and OmxGraphicBufferSource from vndk.

Bug: 295498401
Bug: 185896428
Test: forrest run https://android-build.googleplex.com/builds/abtd/run/L79000000962568362
Change-Id: I616a3345cc696f3e8e9094cdbf3848437172f9d4
parent 7d888930
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -79,6 +79,18 @@ Status OmxGraphicBufferSource::onOmxLoaded(){
    return (OK == err) ? Status::ok() : Status::fromServiceSpecificError(err);
}

status_t OmxGraphicBufferSource::configure(
        const sp<IOmxNodeWrapper>& omxNode,
        int32_t dataSpace,
        int32_t bufferCount,
        uint32_t frameWidth,
        uint32_t frameHeight,
        uint32_t consumerUsage) {
    uint64_t consumerUsage64 = static_cast<uint64_t>(consumerUsage);
    return configure(omxNode, dataSpace, bufferCount,
                     frameWidth, frameHeight, consumerUsage64);
}

status_t OmxGraphicBufferSource::configure(
        const sp<IOmxNodeWrapper>& omxNode,
        int32_t dataSpace,
+13 −1
Original line number Diff line number Diff line
@@ -63,7 +63,19 @@ public:
    // ------------------------------

    // Configure the buffer source to be used with an OMX node with the default
    // data space.
    // data space.(32-bit consumerUsage flag, for vendor partition
    // compatibility)
    [[deprecated("use configure() with a 64-bit consumerUsage flag instead")]]
    status_t configure(
        const sp<IOmxNodeWrapper> &omxNode,
        int32_t dataSpace,
        int32_t bufferCount,
        uint32_t frameWidth,
        uint32_t frameHeight,
        uint32_t consumerUsage);

    // Configure the buffer source to be used with an OMX node with the default
    // data space. (64-bit consumerUsage flag)
    status_t configure(
        const sp<IOmxNodeWrapper> &omxNode,
        int32_t dataSpace,
+12 −0
Original line number Diff line number Diff line
@@ -1144,6 +1144,18 @@ void GraphicBufferSource::onSidebandStreamChanged() {
    ALOG_ASSERT(false, "GraphicBufferSource can't consume sideband streams");
}

status_t GraphicBufferSource::configure(
        const sp<ComponentWrapper>& component,
        int32_t dataSpace,
        int32_t bufferCount,
        uint32_t frameWidth,
        uint32_t frameHeight,
        uint32_t consumerUsage) {
    uint64_t consumerUsage64 = static_cast<uint64_t>(consumerUsage);
    return configure(component, dataSpace, bufferCount,
                     frameWidth, frameHeight, consumerUsage64);
}

status_t GraphicBufferSource::configure(
        const sp<ComponentWrapper>& component,
        int32_t dataSpace,
+13 −1
Original line number Diff line number Diff line
@@ -122,7 +122,19 @@ public:
    // ------------------------------

    // Configure the buffer source to be used with a component with the default
    // data space.
    // data space. (32-bit consumerUsage flag, for vendor partition
    // compatibility)
    [[deprecated("use configure() with a 64-bit consumerUsage flag instead")]]
    status_t configure(
        const sp<ComponentWrapper> &component,
        int32_t dataSpace,
        int32_t bufferCount,
        uint32_t frameWidth,
        uint32_t frameHeight,
        uint32_t consumerUsage);

    // Configure the buffer source to be used with a component with the default
    // data space. (64-bit consumerUsage flag)
    status_t configure(
        const sp<ComponentWrapper> &component,
        int32_t dataSpace,