Lines Matching refs:dev

129 static int gralloc_alloc(alloc_device_t* dev,
135 gralloc_device_t *grdev = (gralloc_device_t *)dev;
357 static int gralloc_free(alloc_device_t* dev,
383 gralloc_device_t *grdev = (gralloc_device_t *)dev;
410 static int gralloc_device_close(struct hw_device_t *dev)
412 gralloc_device_t* d = reinterpret_cast<gralloc_device_t*>(dev);
426 static int fb_compositionComplete(struct framebuffer_device_t* dev)
434 static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer)
436 fb_device_t *fbdev = (fb_device_t *)dev;
461 static int fb_setUpdateRect(struct framebuffer_device_t* dev,
464 fb_device_t *fbdev = (fb_device_t *)dev;
480 static int fb_setSwapInterval(struct framebuffer_device_t* dev,
483 fb_device_t *fbdev = (fb_device_t *)dev;
499 static int fb_close(struct hw_device_t *dev)
501 fb_device_t *fbdev = (fb_device_t *)dev;
789 gralloc_device_t *dev;
790 dev = (gralloc_device_t*)malloc(sizeof(gralloc_device_t));
791 if (NULL == dev) {
797 dev->device.common.tag = HARDWARE_DEVICE_TAG;
798 dev->device.common.version = 0;
799 dev->device.common.module = const_cast<hw_module_t*>(module);
800 dev->device.common.close = gralloc_device_close;
802 dev->device.alloc = gralloc_alloc;
803 dev->device.free = gralloc_free;
804 dev->allocListHead = NULL;
805 pthread_mutex_init(&dev->lock, NULL);
807 *device = &dev->device.common;
837 fb_device_t *dev;
838 dev = (fb_device_t*)malloc(sizeof(fb_device_t));
839 if (NULL == dev) {
842 memset(dev, 0, sizeof(fb_device_t));
846 dev->device.common.tag = HARDWARE_DEVICE_TAG;
847 dev->device.common.version = 0;
848 dev->device.common.module = const_cast<hw_module_t*>(module);
849 dev->device.common.close = fb_close;
850 dev->device.setSwapInterval = fb_setSwapInterval;
851 dev->device.post = fb_post;
852 dev->device.setUpdateRect = 0; //fb_setUpdateRect;
853 dev->device.compositionComplete = fb_compositionComplete; //XXX: this is a dummy
855 const_cast<uint32_t&>(dev->device.flags) = 0;
856 const_cast<uint32_t&>(dev->device.width) = width;
857 const_cast<uint32_t&>(dev->device.height) = height;
858 const_cast<int&>(dev->device.stride) = width;
859 const_cast<int&>(dev->device.format) = HAL_PIXEL_FORMAT_RGBA_8888;
860 const_cast<float&>(dev->device.xdpi) = xdpi;
861 const_cast<float&>(dev->device.ydpi) = ydpi;
862 const_cast<float&>(dev->device.fps) = fps;
863 const_cast<int&>(dev->device.minSwapInterval) = min_si;
864 const_cast<int&>(dev->device.maxSwapInterval) = max_si;
865 *device = &dev->device.common;