Lines Matching refs:dev
47 static int gralloc_alloc_buffer(alloc_device_t* dev,
104 static int gralloc_alloc_framebuffer_locked(alloc_device_t* dev,
108 dev->common.module);
128 return gralloc_alloc_buffer(dev, bufferSize, newUsage, pHandle);
157 static int gralloc_alloc_framebuffer(alloc_device_t* dev,
161 dev->common.module);
163 int err = gralloc_alloc_framebuffer_locked(dev, size, usage, pHandle);
168 static int gralloc_alloc_buffer(alloc_device_t* dev,
185 dev->common.module);
199 static int gralloc_alloc(alloc_device_t* dev,
234 err = gralloc_alloc_framebuffer(dev, size, usage, pHandle);
236 err = gralloc_alloc_buffer(dev, size, usage, pHandle);
247 static int gralloc_free(alloc_device_t* dev,
257 dev->common.module);
263 dev->common.module);
274 static int gralloc_close(struct hw_device_t *dev)
276 gralloc_context_t* ctx = reinterpret_cast<gralloc_context_t*>(dev);
291 gralloc_context_t *dev;
292 dev = (gralloc_context_t*)malloc(sizeof(*dev));
295 memset(dev, 0, sizeof(*dev));
298 dev->device.common.tag = HARDWARE_DEVICE_TAG;
299 dev->device.common.version = 0;
300 dev->device.common.module = const_cast<hw_module_t*>(module);
301 dev->device.common.close = gralloc_close;
303 dev->device.alloc = gralloc_alloc;
304 dev->device.free = gralloc_free;
306 *device = &dev->device.common;