Lines Matching refs:ctx
235 JNIImageReaderContext *ctx; in ImageReader_getContext() local
236 ctx = reinterpret_cast<JNIImageReaderContext *> in ImageReader_getContext()
238 return ctx; in ImageReader_getContext()
244 JNIImageReaderContext* const ctx = ImageReader_getContext(env, thiz); in ImageReader_getProducer() local
245 if (ctx == NULL) { in ImageReader_getProducer()
250 return ctx->getProducer(); in ImageReader_getProducer()
254 jobject thiz, sp<JNIImageReaderContext> ctx) in ImageReader_setNativeContext() argument
258 if (ctx != 0) { in ImageReader_setNativeContext()
259 ctx->incStrong((void*)ImageReader_setNativeContext); in ImageReader_setNativeContext()
265 reinterpret_cast<jlong>(ctx.get())); in ImageReader_setNativeContext()
271 JNIImageReaderContext* const ctx = ImageReader_getContext(env, thiz); in ImageReader_getBufferConsumer() local
272 if (ctx == NULL) { in ImageReader_getBufferConsumer()
277 return ctx->getBufferConsumer(); in ImageReader_getBufferConsumer()
371 sp<JNIImageReaderContext> ctx(new JNIImageReaderContext(env, weakThiz, clazz, maxImages)); in ImageReader_init() local
396 ctx->setBufferConsumer(bufferConsumer); in ImageReader_init()
399 ctx->setProducer(gbProducer); in ImageReader_init()
400 bufferConsumer->setFrameAvailableListener(ctx); in ImageReader_init()
401 ImageReader_setNativeContext(env, thiz, ctx); in ImageReader_init()
402 ctx->setBufferFormat(nativeFormat); in ImageReader_init()
403 ctx->setBufferDataspace(nativeDataspace); in ImageReader_init()
404 ctx->setBufferWidth(width); in ImageReader_init()
405 ctx->setBufferHeight(height); in ImageReader_init()
433 JNIImageReaderContext* const ctx = ImageReader_getContext(env, thiz); in ImageReader_close() local
434 if (ctx == NULL) { in ImageReader_close()
485 JNIImageReaderContext* ctx = ImageReader_getContext(env, thiz); in ImageReader_imageRelease() local
486 if (ctx == NULL) { in ImageReader_imageRelease()
491 BufferItemConsumer* bufferConsumer = ctx->getBufferConsumer(); in ImageReader_imageRelease()
501 ctx->returnBufferItem(buffer); in ImageReader_imageRelease()
502 ALOGV("%s: Image (format: 0x%x) has been released", __FUNCTION__, ctx->getBufferFormat()); in ImageReader_imageRelease()
507 JNIImageReaderContext* ctx = ImageReader_getContext(env, thiz); in ImageReader_imageSetup() local
508 if (ctx == NULL) { in ImageReader_imageSetup()
514 BufferItemConsumer* bufferConsumer = ctx->getBufferConsumer(); in ImageReader_imageSetup()
515 BufferItem* buffer = ctx->getBufferItem(); in ImageReader_imageSetup()
524 ctx->returnBufferItem(buffer); in ImageReader_imageSetup()
545 if (!isFormatOpaque(ctx->getBufferFormat())) { in ImageReader_imageSetup()
559 int imgReaderFmt = ctx->getBufferFormat(); in ImageReader_imageSetup()
560 int imageReaderWidth = ctx->getBufferWidth(); in ImageReader_imageSetup()
561 int imageReaderHeight = ctx->getBufferHeight(); in ImageReader_imageSetup()
584 ctx->returnBufferItem(buffer); in ImageReader_imageSetup()
588 bufferFormat, ctx->getBufferFormat()); in ImageReader_imageSetup()
592 bufferFormat, ctx->getBufferFormat()); in ImageReader_imageSetup()
619 JNIImageReaderContext* ctx = ImageReader_getContext(env, thiz); in ImageReader_detachImage() local
620 if (ctx == NULL) { in ImageReader_detachImage()
625 BufferItemConsumer* bufferConsumer = ctx->getBufferConsumer(); in ImageReader_detachImage()
649 JNIImageReaderContext* ctx = ImageReader_getContext(env, thiz); in ImageReader_discardFreeBuffers() local
650 if (ctx == NULL) { in ImageReader_discardFreeBuffers()
655 BufferItemConsumer* bufferConsumer = ctx->getBufferConsumer(); in ImageReader_discardFreeBuffers()