Revert "use 64-bits usage bits almost everywhere"
Bug: 38466700
This reverts commit 175d98757d7d9003d4f64756cf4c2b366ba77e97.
Change-Id: I5f08a4ca91511775cd52250d10a0220b258b8368
diff --git a/libs/gui/bufferqueue/1.0/H2BGraphicBufferProducer.cpp b/libs/gui/bufferqueue/1.0/H2BGraphicBufferProducer.cpp
index 7c0552e..fda5b94 100644
--- a/libs/gui/bufferqueue/1.0/H2BGraphicBufferProducer.cpp
+++ b/libs/gui/bufferqueue/1.0/H2BGraphicBufferProducer.cpp
@@ -125,7 +125,7 @@
t->attr.stride = l.getStride();
t->attr.format = static_cast<PixelFormat>(l.getPixelFormat());
t->attr.layerCount = l.getLayerCount();
- t->attr.usage = uint32_t(l.getUsage()); // FIXME: need 64-bits usage version
+ t->attr.usage = l.getUsage();
t->attr.id = l.getId();
t->attr.generationNumber = l.getGenerationNumber();
t->nativeHandle = hidl_handle(l.handle);
@@ -988,15 +988,14 @@
return toStatusT(mBase->setAsyncMode(async));
}
-// FIXME: usage bits truncated -- needs a 64-bits usage version
status_t H2BGraphicBufferProducer::dequeueBuffer(
int* slot, sp<Fence>* fence,
uint32_t w, uint32_t h, ::android::PixelFormat format,
- uint64_t usage, FrameEventHistoryDelta* outTimestamps) {
+ uint32_t usage, FrameEventHistoryDelta* outTimestamps) {
*fence = new Fence();
status_t fnStatus;
status_t transStatus = toStatusT(mBase->dequeueBuffer(
- w, h, static_cast<PixelFormat>(format), uint32_t(usage),
+ w, h, static_cast<PixelFormat>(format), usage,
outTimestamps != nullptr,
[&fnStatus, slot, fence, outTimestamps] (
Status status,
@@ -1145,11 +1144,10 @@
return toStatusT(mBase->setSidebandStream(stream == nullptr ? nullptr : stream->handle()));
}
-// FIXME: usage bits truncated -- needs a 64-bits usage version
void H2BGraphicBufferProducer::allocateBuffers(uint32_t width, uint32_t height,
- ::android::PixelFormat format, uint64_t usage) {
+ ::android::PixelFormat format, uint32_t usage) {
mBase->allocateBuffers(
- width, height, static_cast<PixelFormat>(format), uint32_t(usage));
+ width, height, static_cast<PixelFormat>(format), usage);
}
status_t H2BGraphicBufferProducer::allowAllocation(bool allow) {