Lines Matching defs:dev

61 static int gralloc_alloc_buffer(alloc_device_t* dev,
128 static int gralloc_alloc_framebuffer_locked(alloc_device_t* dev,
132 dev->common.module);
152 return gralloc_alloc_buffer(dev, bufferSize, newUsage, pHandle);
182 static int gralloc_alloc_framebuffer(alloc_device_t* dev,
186 dev->common.module);
188 int err = gralloc_alloc_framebuffer_locked(dev, size, usage, pHandle);
197 int master_fd = open("/dev/pmem", O_RDWR, 0);
249 int gpu = open("/dev/msm_hw3dm", O_RDWR, 0);
314 static int gralloc_alloc_buffer(alloc_device_t* dev,
346 dev->common.module);
360 fd = open("/dev/pmem", O_RDWR, 0);
396 dev->common.module);
419 fd = open("/dev/null", O_RDONLY); // just so marshalling doesn't fail
438 dev->common.module);
445 dev->common.module);
461 static int gralloc_alloc(alloc_device_t* dev,
505 err = gralloc_alloc_framebuffer(dev, size, usage, pHandle);
507 err = gralloc_alloc_buffer(dev, size, usage, pHandle);
518 static int gralloc_free(alloc_device_t* dev,
528 dev->common.module);
553 dev->common.module);
564 static int gralloc_close(struct hw_device_t *dev)
566 gralloc_context_t* ctx = reinterpret_cast<gralloc_context_t*>(dev);
581 gralloc_context_t *dev;
582 dev = (gralloc_context_t*)malloc(sizeof(*dev));
585 memset(dev, 0, sizeof(*dev));
588 dev->device.common.tag = HARDWARE_DEVICE_TAG;
589 dev->device.common.version = 0;
590 dev->device.common.module = const_cast<hw_module_t*>(module);
591 dev->device.common.close = gralloc_close;
593 dev->device.alloc = gralloc_alloc;
594 dev->device.free = gralloc_free;
596 *device = &dev->device.common;