GraphicBufferSource: Use 64bit consumer usage
This was merged before, but mistakenly reverted by a merge conflict
resolution.
Bug: 185896428
Change-Id: I5e6033b1d50a20fe4e0285bca50fdd8fb78c7224
diff --git a/media/codec2/hal/client/client.cpp b/media/codec2/hal/client/client.cpp
index 2fa088a..829a179 100644
--- a/media/codec2/hal/client/client.cpp
+++ b/media/codec2/hal/client/client.cpp
@@ -1523,8 +1523,8 @@
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 @@
// 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;
}
}