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

Commit 41b393f5 authored by Peiyong Lin's avatar Peiyong Lin Committed by Android (Google) Code Review
Browse files

Merge "libui: filter out invalid buffer usage bits"

parents b08b7226 12ca5279
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -42,9 +42,6 @@ uint64_t getValid10UsageBits() {
        for (const auto bit : hardware::hidl_enum_range<BufferUsage>()) {
        for (const auto bit : hardware::hidl_enum_range<BufferUsage>()) {
            bits = bits | bit;
            bits = bits | bit;
        }
        }
        // TODO(b/72323293, b/72703005): Remove these additional bits
        bits = bits | (1 << 10) | (1 << 13);

        return bits;
        return bits;
    }();
    }();
    return valid10UsageBits;
    return valid10UsageBits;
+3 −0
Original line number Original line Diff line number Diff line
@@ -101,6 +101,9 @@ status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height,
    if (layerCount < 1)
    if (layerCount < 1)
        layerCount = 1;
        layerCount = 1;


    // TODO(b/72323293, b/72703005): Remove these invalid bits from callers
    usage &= ~static_cast<uint64_t>((1 << 10) | (1 << 13));

    Gralloc2::IMapper::BufferDescriptorInfo info = {};
    Gralloc2::IMapper::BufferDescriptorInfo info = {};
    info.width = width;
    info.width = width;
    info.height = height;
    info.height = height;