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

Commit dbb4a302 authored by Sungtak Lee's avatar Sungtak Lee
Browse files

GraphicBufferSource: Use 64bit consumer usage

This was merged before, but mistakenly reverted by a merge conflict
resolution.

Bug: 185896428
Change-Id: I5e6033b1d50a20fe4e0285bca50fdd8fb78c7224
parent 3cc67e7d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1523,8 +1523,8 @@ c2_status_t Codec2Client::Component::setOutputSurface(
    uint64_t consumerUsage = kDefaultConsumerUsage;
    {
        if (surface) {
            int usage = 0;
            status_t err = surface->query(NATIVE_WINDOW_CONSUMER_USAGE_BITS, &usage);
            uint64_t usage = 0;
            status_t err = surface->getConsumerUsage(&usage);
            if (err != NO_ERROR) {
                ALOGD("setOutputSurface -- failed to get consumer usage bits (%d/%s). ignoring",
                        err, asString(err));
@@ -1537,8 +1537,7 @@ c2_status_t Codec2Client::Component::setOutputSurface(
                // they do not exist inside of C2 scope. Any buffer usage shall be communicated
                // through the sideband channel.

                // do an unsigned conversion as bit-31 may be 1
                consumerUsage = (uint32_t)usage | kDefaultConsumerUsage;
                consumerUsage = usage | kDefaultConsumerUsage;
            }
        }