Lines Matching refs:hnd
130 unsigned int ion_flags, private_handle_t **hnd, int *stride) in gralloc_alloc_rgb() argument
193 *hnd = new private_handle_t(fd, size, usage, w, h, format, *stride, in gralloc_alloc_rgb()
201 private_handle_t **hnd, int *stride) in gralloc_alloc_framework_yuv() argument
225 *hnd = new private_handle_t(fd, size, usage, w, h, format, *stride, h); in gralloc_alloc_framework_yuv()
231 private_handle_t **hnd, int *stride) in gralloc_alloc_yuv() argument
274 ion_flags, hnd, stride); in gralloc_alloc_yuv()
295 *hnd = new private_handle_t(fd, luma_size, usage, w, h, in gralloc_alloc_yuv()
306 *hnd = new private_handle_t(fd, fd1, fd2, luma_size, usage, w, h, in gralloc_alloc_yuv()
309 *hnd = new private_handle_t(fd, fd1, luma_size, usage, w, h, format, in gralloc_alloc_yuv()
314 if (!err && *hnd) { in gralloc_alloc_yuv()
316 (*hnd)->chroma = HAL_PIXEL_CHROMA_BT601_8; in gralloc_alloc_yuv()
317 (*hnd)->gamut = HAL_PIXEL_GAMUT_NARROW_8; in gralloc_alloc_yuv()
319 (*hnd)->chroma = HAL_PIXEL_CHROMA_BT709_8; in gralloc_alloc_yuv()
320 (*hnd)->gamut = HAL_PIXEL_GAMUT_WIDE_8; in gralloc_alloc_yuv()
339 private_handle_t *hnd = NULL; in gralloc_alloc() local
352 err = gralloc_alloc_rgb(m->ionfd, w, h, format, usage, ion_flags, &hnd, in gralloc_alloc()
356 &hnd, &stride); in gralloc_alloc()
360 err = gralloc_register_buffer(module, hnd); in gralloc_alloc()
364 *pHandle = hnd; in gralloc_alloc()
368 if (!hnd) in gralloc_alloc()
370 close(hnd->fd); in gralloc_alloc()
371 if (hnd->fd1 >= 0) in gralloc_alloc()
372 close(hnd->fd1); in gralloc_alloc()
373 if (hnd->fd2 >= 0) in gralloc_alloc()
374 close(hnd->fd2); in gralloc_alloc()
384 private_handle_t const* hnd = reinterpret_cast<private_handle_t const*>(handle); in gralloc_free() local
388 gralloc_unregister_buffer(module, hnd); in gralloc_free()
390 close(hnd->fd); in gralloc_free()
391 if (hnd->fd1 >= 0) in gralloc_free()
392 close(hnd->fd1); in gralloc_free()
393 if (hnd->fd2 >= 0) in gralloc_free()
394 close(hnd->fd2); in gralloc_free()
396 delete hnd; in gralloc_free()