Lines Matching refs:mConsumer
71 BufferQueue::createBufferQueue(&mProducer, &mConsumer); in createBufferQueue()
96 sp<IGraphicBufferConsumer> mConsumer; member in android::BufferQueueTest
134 mConsumer = interface_cast<IGraphicBufferConsumer>(binderConsumer); in TEST_F()
135 EXPECT_TRUE(mConsumer != nullptr); in TEST_F()
138 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false)); in TEST_F()
163 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
175 mConsumer->consumerConnect(dc, false); in TEST_F()
195 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
205 ASSERT_EQ(INVALID_OPERATION, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
211 mConsumer->consumerConnect(dc, false); in TEST_F()
213 EXPECT_EQ(OK, mConsumer->setMaxBufferCount(10)); in TEST_F()
214 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(10)); in TEST_F()
223 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount( in TEST_F()
226 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(0)); in TEST_F()
227 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(-3)); in TEST_F()
228 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount( in TEST_F()
230 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(100)); in TEST_F()
239 EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(3)); in TEST_F()
246 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
249 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(2)); in TEST_F()
255 mConsumer->consumerConnect(dc, false); in TEST_F()
265 EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(1)); in TEST_F()
266 EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(2)); in TEST_F()
267 EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(minBufferCount)); in TEST_F()
282 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
284 EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(3)); in TEST_F()
292 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
295 EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount( in TEST_F()
302 mConsumer->consumerConnect(dc, false); in TEST_F()
305 EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(1)); in TEST_F()
311 mConsumer->consumerConnect(dc, false); in TEST_F()
313 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxBufferCount(0)); in TEST_F()
314 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxBufferCount( in TEST_F()
317 EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(5)); in TEST_F()
318 EXPECT_EQ(BAD_VALUE, mConsumer->setMaxBufferCount(3)); in TEST_F()
324 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false)); in TEST_F()
366 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, static_cast<nsecs_t>(0))); in TEST_F()
378 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false)); in TEST_F()
395 ASSERT_EQ(BAD_VALUE, mConsumer->detachBuffer(-1)); // Index too low in TEST_F()
396 ASSERT_EQ(BAD_VALUE, mConsumer->detachBuffer( in TEST_F()
398 ASSERT_EQ(BAD_VALUE, mConsumer->detachBuffer(0)); // Not acquired in TEST_F()
401 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, static_cast<nsecs_t>(0))); in TEST_F()
403 ASSERT_EQ(OK, mConsumer->detachBuffer(item.mSlot)); in TEST_F()
404 ASSERT_EQ(BAD_VALUE, mConsumer->detachBuffer(item.mSlot)); // Not acquired in TEST_F()
415 ASSERT_EQ(BAD_VALUE, mConsumer->attachBuffer(nullptr, safeToClobberBuffer)); in TEST_F()
416 ASSERT_EQ(BAD_VALUE, mConsumer->attachBuffer(&newSlot, nullptr)); in TEST_F()
417 ASSERT_EQ(OK, mConsumer->attachBuffer(&newSlot, item.mGraphicBuffer)); in TEST_F()
419 ASSERT_EQ(OK, mConsumer->releaseBuffer(newSlot, 0, EGL_NO_DISPLAY, in TEST_F()
437 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false)); in TEST_F()
462 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, static_cast<nsecs_t>(0))); in TEST_F()
463 ASSERT_EQ(OK, mConsumer->detachBuffer(item.mSlot)); in TEST_F()
468 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, static_cast<nsecs_t>(0))); in TEST_F()
480 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()
488 ASSERT_EQ(OK, mConsumer->setDefaultBufferSize(WIDTH, HEIGHT)); in TEST_F()
518 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()
544 ASSERT_EQ(BAD_VALUE, mConsumer->attachBuffer(&outSlot, buffer)); in TEST_F()
554 ASSERT_EQ(OK, mConsumer->attachBuffer(&outSlot, buffer)); in TEST_F()
560 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()
593 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
599 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
604 mConsumer->acquireBuffer(&item, 0)); in TEST_F()
610 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()
636 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
642 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
659 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
671 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
679 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()
713 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
719 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
724 mConsumer->acquireBuffer(&item, 0)); in TEST_F()
730 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()
792 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()
814 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false)); in TEST_F()
849 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
850 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
868 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false)); in TEST_F()
902 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
903 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
917 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
918 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
926 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
927 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
930 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
931 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
944 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
945 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
949 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
950 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
955 ASSERT_EQ(OK, mConsumer->getOccupancyHistory(false, &history)); in TEST_F()
983 ASSERT_EQ(OK, mConsumer->getOccupancyHistory(false, &history)); in TEST_F()
988 ASSERT_EQ(OK, mConsumer->getOccupancyHistory(true, &history)); in TEST_F()
1004 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false)); in TEST_F()
1044 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
1045 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
1048 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
1051 ASSERT_EQ(OK, mConsumer->discardFreeBuffers()); in TEST_F()
1055 mConsumer->dumpState(String8{}, &dumpString); in TEST_F()
1081 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()
1085 ASSERT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(1)); in TEST_F()
1122 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()
1144 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
1147 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
1156 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
1159 ASSERT_EQ(OK, mConsumer->releaseBuffer(item.mSlot, item.mFrameNumber, in TEST_F()
1173 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); in TEST_F()
1181 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, true)); in TEST_F()