Lines Matching refs:buf
212 ANativeWindowBuffer* buf; in TEST_F() local
213 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
214 EXPECT_EQ(1, buf->width); in TEST_F()
215 EXPECT_EQ(1, buf->height); in TEST_F()
216 EXPECT_EQ(PIXEL_FORMAT_RGBA_8888, buf->format); in TEST_F()
217 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
221 ANativeWindowBuffer* buf; in TEST_F() local
223 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
224 EXPECT_EQ(16, buf->width); in TEST_F()
225 EXPECT_EQ(8, buf->height); in TEST_F()
226 EXPECT_EQ(PIXEL_FORMAT_RGB_565, buf->format); in TEST_F()
227 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
231 ANativeWindowBuffer* buf; in TEST_F() local
233 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
234 EXPECT_EQ(1, buf->width); in TEST_F()
235 EXPECT_EQ(1, buf->height); in TEST_F()
236 EXPECT_EQ(PIXEL_FORMAT_RGB_565, buf->format); in TEST_F()
237 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
241 ANativeWindowBuffer* buf; in TEST_F() local
243 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
244 EXPECT_EQ(16, buf->width); in TEST_F()
245 EXPECT_EQ(8, buf->height); in TEST_F()
246 EXPECT_EQ(PIXEL_FORMAT_RGBA_8888, buf->format); in TEST_F()
247 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
251 ANativeWindowBuffer* buf; in TEST_F() local
253 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
254 EXPECT_EQ(16, buf->width); in TEST_F()
255 EXPECT_EQ(8, buf->height); in TEST_F()
256 EXPECT_EQ(PIXEL_FORMAT_RGBA_8888, buf->format); in TEST_F()
257 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
259 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
260 EXPECT_EQ(1, buf->width); in TEST_F()
261 EXPECT_EQ(1, buf->height); in TEST_F()
262 EXPECT_EQ(PIXEL_FORMAT_RGBA_8888, buf->format); in TEST_F()
263 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
267 ANativeWindowBuffer* buf; in TEST_F() local
269 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
270 EXPECT_EQ(1, buf->width); in TEST_F()
271 EXPECT_EQ(1, buf->height); in TEST_F()
272 EXPECT_EQ(PIXEL_FORMAT_RGB_565, buf->format); in TEST_F()
273 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
275 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
276 EXPECT_EQ(16, buf->width); in TEST_F()
277 EXPECT_EQ(8, buf->height); in TEST_F()
278 EXPECT_EQ(PIXEL_FORMAT_RGB_565, buf->format); in TEST_F()
279 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
284 ANativeWindowBuffer* buf; in TEST_F() local
286 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
287 EXPECT_EQ(16, buf->width); in TEST_F()
288 EXPECT_EQ(8, buf->height); in TEST_F()
289 EXPECT_EQ(PIXEL_FORMAT_RGBA_8888, buf->format); in TEST_F()
290 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
294 ANativeWindowBuffer* buf[2]; in TEST_F() local
296 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
297 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
298 EXPECT_NE(buf[0], buf[1]); in TEST_F()
299 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[0], -1)); in TEST_F()
300 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[1], -1)); in TEST_F()
302 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
303 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
304 EXPECT_NE(buf[0], buf[1]); in TEST_F()
305 EXPECT_EQ(16, buf[0]->width); in TEST_F()
306 EXPECT_EQ(16, buf[1]->width); in TEST_F()
307 EXPECT_EQ(8, buf[0]->height); in TEST_F()
308 EXPECT_EQ(8, buf[1]->height); in TEST_F()
309 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[0], -1)); in TEST_F()
310 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[1], -1)); in TEST_F()
314 ANativeWindowBuffer* buf[2]; in TEST_F() local
317 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
318 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
319 EXPECT_NE(buf[0], buf[1]); in TEST_F()
320 EXPECT_EQ(16, buf[0]->width); in TEST_F()
321 EXPECT_EQ(16, buf[1]->width); in TEST_F()
322 EXPECT_EQ(8, buf[0]->height); in TEST_F()
323 EXPECT_EQ(8, buf[1]->height); in TEST_F()
324 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[0], -1)); in TEST_F()
325 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[1], -1)); in TEST_F()
327 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
328 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
329 EXPECT_NE(buf[0], buf[1]); in TEST_F()
330 EXPECT_EQ(12, buf[0]->width); in TEST_F()
331 EXPECT_EQ(12, buf[1]->width); in TEST_F()
332 EXPECT_EQ(24, buf[0]->height); in TEST_F()
333 EXPECT_EQ(24, buf[1]->height); in TEST_F()
334 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[0], -1)); in TEST_F()
335 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[1], -1)); in TEST_F()
339 android_native_buffer_t* buf[3]; in TEST_F() local
343 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
344 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
351 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
352 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
353 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
354 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[1], -1)); in TEST_F()
362 android_native_buffer_t* buf[3]; in TEST_F() local
365 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
366 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
367 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[2])); in TEST_F()
368 EXPECT_NE(buf[0], buf[1]); in TEST_F()
369 EXPECT_NE(buf[1], buf[2]); in TEST_F()
370 EXPECT_NE(buf[2], buf[0]); in TEST_F()
371 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
372 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[1], -1)); in TEST_F()
373 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[2], -1)); in TEST_F()
375 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[0]); in TEST_F()
377 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[1]); in TEST_F()
379 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[2]); in TEST_F()
383 android_native_buffer_t* buf[3]; in TEST_F() local
386 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
387 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
388 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[2])); in TEST_F()
389 EXPECT_NE(buf[0], buf[1]); in TEST_F()
390 EXPECT_NE(buf[1], buf[2]); in TEST_F()
391 EXPECT_NE(buf[2], buf[0]); in TEST_F()
392 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
394 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[0]); in TEST_F()
395 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[1], -1)); in TEST_F()
397 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[1]); in TEST_F()
398 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[2], -1)); in TEST_F()
400 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[2]); in TEST_F()
404 android_native_buffer_t* buf[3]; in TEST_F() local
408 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
409 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
411 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[0]); in TEST_F()
413 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
414 EXPECT_NE(buf[0], buf[1]); in TEST_F()
415 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[1], -1)); in TEST_F()
417 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[1]); in TEST_F()
419 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[2])); in TEST_F()
420 EXPECT_NE(buf[1], buf[2]); in TEST_F()
421 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[2], -1)); in TEST_F()
423 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[2]); in TEST_F()
429 android_native_buffer_t* buf[3]; in TEST_F() local
437 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
438 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
439 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
440 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[1], -1)); in TEST_F()
441 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[2])); in TEST_F()
442 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[2], -1)); in TEST_F()
443 EXPECT_NE(buf[0], buf[1]); in TEST_F()
444 EXPECT_NE(buf[1], buf[2]); in TEST_F()
445 EXPECT_NE(buf[2], buf[0]); in TEST_F()
446 EXPECT_EQ(firstBuf, buf[2]); in TEST_F()
450 android_native_buffer_t* buf[3]; in TEST_F() local
455 EXPECT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
456 EXPECT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
457 EXPECT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[2])); in TEST_F()
459 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[2], -1)); in TEST_F()
460 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[1], -1)); in TEST_F()
463 EXPECT_EQ(mST->getCurrentBuffer().get(), buf[1]); in TEST_F()
465 EXPECT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[2])); in TEST_F()
469 EXPECT_EQ(-EBUSY, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
471 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[0], -1)); in TEST_F()
472 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf[2], -1)); in TEST_F()
481 android_native_buffer_t* buf; in TEST_F() local
482 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
483 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf, -1)); in TEST_F()
529 android_native_buffer_t* buf[3]; in TEST_F() local
533 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
534 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
540 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
541 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
543 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[1])); in TEST_F()
544 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[1], -1)); in TEST_F()
552 android_native_buffer_t* buf[3]; in TEST_F() local
555 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
556 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
582 android_native_buffer_t* buf[3]; in TEST_F() local
585 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
586 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()
613 android_native_buffer_t* buf[3]; in TEST_F() local
623 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf[0])); in TEST_F()
625 ASSERT_EQ(OK, mANW->queueBuffer(mANW.get(), buf[0], -1)); in TEST_F()