From bab495b99d832ad71a494cef4123d6ba706c08f7 Mon Sep 17 00:00:00 2001 From: Jason Macnak Date: Tue, 15 Oct 2024 13:38:15 -0700 Subject: Avoid using a format for the usage param in consumer test Bug: b/373667975 Test: atest libgui_test Change-Id: I4fb799c771c3dbdf774b93ef050c810ab45bea6e Merged-In: I492a25eededac60f835831390de037bdc5f4eac7 --- libs/gui/tests/BufferItemConsumer_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/gui/tests/BufferItemConsumer_test.cpp b/libs/gui/tests/BufferItemConsumer_test.cpp index 6880678050..656453411d 100644 --- a/libs/gui/tests/BufferItemConsumer_test.cpp +++ b/libs/gui/tests/BufferItemConsumer_test.cpp @@ -28,6 +28,7 @@ static constexpr int kWidth = 100; static constexpr int kHeight = 100; static constexpr int kMaxLockedBuffers = 3; static constexpr int kFormat = HAL_PIXEL_FORMAT_RGBA_8888; +static constexpr int kUsage = GRALLOC_USAGE_SW_READ_RARELY; static constexpr int kFrameSleepUs = 30 * 1000; class BufferItemConsumerTest : public ::testing::Test { @@ -44,8 +45,7 @@ class BufferItemConsumerTest : public ::testing::Test { void SetUp() override { BufferQueue::createBufferQueue(&mProducer, &mConsumer); - mBIC = - new BufferItemConsumer(mConsumer, kFormat, kMaxLockedBuffers, true); + mBIC = new BufferItemConsumer(mConsumer, kUsage, kMaxLockedBuffers, true); String8 name("BufferItemConsumer_Under_Test"); mBIC->setName(name); mBFL = new BufferFreedListener(this); -- cgit v1.2.3-59-g8ed1b