Lines Matching refs:dev
57 static int fb_set_swap_interval(struct framebuffer_device_t *dev, int interval) in fb_set_swap_interval() argument
59 if (interval < dev->minSwapInterval) in fb_set_swap_interval()
61 interval = dev->minSwapInterval; in fb_set_swap_interval()
63 else if (interval > dev->maxSwapInterval) in fb_set_swap_interval()
65 interval = dev->maxSwapInterval; in fb_set_swap_interval()
68 private_module_t *m = reinterpret_cast<private_module_t *>(dev->common.module); in fb_set_swap_interval()
73 gralloc_vsync_disable(dev); in fb_set_swap_interval()
77 gralloc_vsync_enable(dev); in fb_set_swap_interval()
83 static int fb_post(struct framebuffer_device_t *dev, buffer_handle_t buffer) in fb_post() argument
91 private_module_t *m = reinterpret_cast<private_module_t *>(dev->common.module); in fb_post()
127 if (0 != gralloc_wait_for_vsync(dev)) in fb_post()
392 framebuffer_device_t *dev = reinterpret_cast<framebuffer_device_t *>(device); in fb_close() local
394 if (dev) in fb_close()
396 free(dev); in fb_close()
533 int compositionComplete(struct framebuffer_device_t *dev) in compositionComplete() argument
535 GRALLOC_UNUSED(dev); in compositionComplete()
604 …framebuffer_device_t *dev = reinterpret_cast<framebuffer_device_t *>(malloc(sizeof(framebuffer_dev… in framebuffer_device_open() local
607 if ((status < 0) || (!dev)) in framebuffer_device_open()
614 (!dev) ? (void)(status = -ENOMEM) : free(dev); in framebuffer_device_open()
618 memset(dev, 0, sizeof(*dev)); in framebuffer_device_open()
621 dev->common.tag = HARDWARE_DEVICE_TAG; in framebuffer_device_open()
622 dev->common.version = 0; in framebuffer_device_open()
623 dev->common.module = const_cast<hw_module_t *>(module); in framebuffer_device_open()
624 dev->common.close = fb_close; in framebuffer_device_open()
625 dev->setSwapInterval = fb_set_swap_interval; in framebuffer_device_open()
626 dev->post = fb_post; in framebuffer_device_open()
627 dev->setUpdateRect = 0; in framebuffer_device_open()
628 dev->compositionComplete = &compositionComplete; in framebuffer_device_open()
631 const_cast<uint32_t &>(dev->flags) = 0; in framebuffer_device_open()
632 const_cast<uint32_t &>(dev->width) = m->info.xres; in framebuffer_device_open()
633 const_cast<uint32_t &>(dev->height) = m->info.yres; in framebuffer_device_open()
634 const_cast<int &>(dev->stride) = stride; in framebuffer_device_open()
636 const_cast<int &>(dev->format) = HAL_PIXEL_FORMAT_RGB_565; in framebuffer_device_open()
638 const_cast<int &>(dev->format) = HAL_PIXEL_FORMAT_BGRA_8888; in framebuffer_device_open()
640 const_cast<float &>(dev->xdpi) = m->xdpi; in framebuffer_device_open()
641 const_cast<float &>(dev->ydpi) = m->ydpi; in framebuffer_device_open()
642 const_cast<float &>(dev->fps) = m->fps; in framebuffer_device_open()
643 const_cast<int &>(dev->minSwapInterval) = 0; in framebuffer_device_open()
644 const_cast<int &>(dev->maxSwapInterval) = 1; in framebuffer_device_open()
645 *device = &dev->common; in framebuffer_device_open()
647 gralloc_vsync_enable(dev); in framebuffer_device_open()