Lines Matching refs:anw

96 static status_t configureSurface(const sp<ANativeWindow>& anw,
102 err = native_window_set_buffers_dimensions(anw.get(), width, height);
109 err = native_window_set_buffers_format(anw.get(), pixelFmt);
116 err = native_window_set_usage(anw.get(), GRALLOC_USAGE_SW_WRITE_OFTEN);
124 err = anw.get()->query(anw.get(),
136 err = native_window_set_buffer_count(anw.get(), maxBufferSlack + 1 + minUndequeuedBuffers);
149 * anw - a surface to produce a frame in.
159 static status_t produceFrame(const sp<ANativeWindow>& anw,
169 __FUNCTION__, anw.get(), bufWidth, bufHeight, pixelFmt, bufSize);
171 if (anw == 0) {
172 ALOGE("%s: anw must not be NULL", __FUNCTION__);
193 err = native_window_dequeue_buffer_and_wait(anw.get(), &anb);
208 err = anw->query(anw.get(), NATIVE_WINDOW_FORMAT, &bufFmt);
244 ALOGV("%s: Lock buffer from %p for write", __FUNCTION__, anw.get());
272 ALOGV("%s: Lock buffer from %p for write", __FUNCTION__, anw.get());
304 ALOGV("%s: Lock buffer from %p for write", __FUNCTION__, anw.get());
348 ALOGV("%s: Unlock buffer from %p", __FUNCTION__, anw.get());
355 ALOGV("%s: Queue buffer to %p", __FUNCTION__, anw.get());
356 err = anw->queueBuffer(anw.get(), buf->getNativeBuffer(), /*fenceFd*/-1);
365 sp<ANativeWindow> anw;
367 anw = android_view_Surface_getNativeWindow(env, surface);
375 if (anw == NULL) {
380 return anw;
384 sp<ANativeWindow> anw;
386 anw = android_SurfaceTexture_getNativeWindow(env, surfaceTexture);
394 if (anw == NULL) {
399 return anw;
425 sp<ANativeWindow> anw;
426 if ((anw = getNativeWindow(env, surface)) == NULL) {
431 status_t err = anw->query(anw.get(), NATIVE_WINDOW_FORMAT, &fmt);
454 sp<ANativeWindow> anw;
455 if ((anw = getNativeWindow(env, surface)) == NULL) {
460 status_t err = anw->query(anw.get(), NATIVE_WINDOW_WIDTH, dimenBuf);
466 err = anw->query(anw.get(), NATIVE_WINDOW_HEIGHT, dimenBuf + 1);
480 sp<ANativeWindow> anw;
481 if ((anw = getNativeWindow(env, surface)) == NULL) {
487 status_t err = anw->query(anw.get(), NATIVE_WINDOW_CONSUMER_USAGE_BITS, &usage);
499 sp<ANativeWindow> anw;
500 if ((anw = getNativeWindowFromTexture(env, surfaceTexture)) == NULL) {
506 status_t err = anw->query(anw.get(), NATIVE_WINDOW_WIDTH, dimenBuf);
513 err = anw->query(anw.get(), NATIVE_WINDOW_HEIGHT, dimenBuf + 1);
530 sp<ANativeWindow> anw;
531 if ((anw = getNativeWindow(env, surface)) == NULL) {
535 status_t err = configureSurface(anw, width, height, pixelFormat, CAMERA_DEVICE_BUFFER_SLACK);
546 sp<ANativeWindow> anw;
548 if ((anw = getNativeWindow(env, surface)) == NULL) {
566 status_t err = produceFrame(anw, reinterpret_cast<uint8_t*>(pixels), width, height,
580 sp<ANativeWindow> anw;
581 if ((anw = getNativeWindow(env, surface)) == NULL) {
585 status_t err = native_window_set_buffers_format(anw.get(), pixelFormat);
596 sp<ANativeWindow> anw;
597 if ((anw = getNativeWindow(env, surface)) == NULL) {
604 status_t err = native_window_set_buffers_user_dimensions(anw.get(), width, height);
640 sp<ANativeWindow> anw;
641 if ((anw = getNativeWindow(env, surface)) == NULL) {
664 if ((err = native_window_set_buffers_sticky_transform(anw.get(), transform)) != NO_ERROR) {
676 sp<ANativeWindow> anw;
677 if ((anw = getNativeWindow(env, surface)) == NULL) {
684 if ((err = native_window_set_buffers_timestamp(anw.get(), static_cast<int64_t>(timestamp))) !=