Skip to content

Commit b1fd186

Browse files
Treehugger RobotAndroid (Google) Code Review
authored andcommitted
Merge "Remove flags from cppflags of libgui_test." into main
2 parents a1d84d1 + 235d6d6 commit b1fd186

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

libs/gui/tests/Android.bp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ cc_test {
5151
"-Werror",
5252
"-Wextra",
5353
"-Wthread-safety",
54-
"-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_SETFRAMERATE=true",
55-
"-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_EXTENDEDALLOCATE=true",
56-
"-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_WB_CONSUMER_BASE_OWNS_BQ=true",
57-
"-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_WB_PLATFORM_API_IMPROVEMENTS=true",
58-
"-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_WB_UNLIMITED_SLOTS=true",
5954
],
6055

6156
srcs: [

libs/gui/tests/BufferQueue_test.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,10 +1452,6 @@ TEST_F(BufferQueueTest, TestProducerConnectDisconnect) {
14521452
ASSERT_EQ(NO_INIT, mProducer->disconnect(NATIVE_WINDOW_API_CPU));
14531453
}
14541454

1455-
TEST_F(BufferQueueTest, TestBqSetFrameRateFlagBuildTimeIsSet) {
1456-
ASSERT_EQ(flags::bq_setframerate(), COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(BQ_SETFRAMERATE));
1457-
}
1458-
14591455
struct BufferItemConsumerSetFrameRateListener : public BufferItemConsumer {
14601456
BufferItemConsumerSetFrameRateListener() : BufferItemConsumer(GRALLOC_USAGE_SW_READ_OFTEN, 1) {}
14611457

@@ -1561,9 +1557,14 @@ TEST_F(BufferQueueTest, TestAdditionalOptions) {
15611557
{.name = "android.hardware.graphics.common.Dataspace", ADATASPACE_DISPLAY_P3},
15621558
}};
15631559

1564-
ASSERT_EQ(NO_INIT,
1565-
native_window_set_buffers_additional_options(surface.get(), extras.data(),
1566-
extras.size()));
1560+
auto status = native_window_set_buffers_additional_options(surface.get(), extras.data(),
1561+
extras.size());
1562+
if (flags::bq_extendedallocate()) {
1563+
ASSERT_EQ(NO_INIT, status);
1564+
} else {
1565+
ASSERT_EQ(INVALID_OPERATION, status);
1566+
GTEST_SKIP() << "Flag bq_extendedallocate not enabled";
1567+
}
15671568

15681569
if (!IsCuttlefish()) {
15691570
GTEST_SKIP() << "Not cuttlefish";

0 commit comments

Comments
 (0)