Lines Matching refs:usage
36 static uint64_t gralloc0_convert_usage(int usage) in gralloc0_convert_usage() argument
40 if (usage & GRALLOC_USAGE_CURSOR) in gralloc0_convert_usage()
42 if ((usage & GRALLOC_USAGE_SW_READ_MASK) == GRALLOC_USAGE_SW_READ_RARELY) in gralloc0_convert_usage()
44 if ((usage & GRALLOC_USAGE_SW_READ_MASK) == GRALLOC_USAGE_SW_READ_OFTEN) in gralloc0_convert_usage()
46 if ((usage & GRALLOC_USAGE_SW_WRITE_MASK) == GRALLOC_USAGE_SW_WRITE_RARELY) in gralloc0_convert_usage()
48 if ((usage & GRALLOC_USAGE_SW_WRITE_MASK) == GRALLOC_USAGE_SW_WRITE_OFTEN) in gralloc0_convert_usage()
50 if (usage & GRALLOC_USAGE_HW_TEXTURE) in gralloc0_convert_usage()
52 if (usage & GRALLOC_USAGE_HW_RENDER) in gralloc0_convert_usage()
54 if (usage & GRALLOC_USAGE_HW_2D) in gralloc0_convert_usage()
56 if (usage & GRALLOC_USAGE_HW_COMPOSER) in gralloc0_convert_usage()
59 if (usage & GRALLOC_USAGE_HW_FB) in gralloc0_convert_usage()
61 if (usage & GRALLOC_USAGE_EXTERNAL_DISP) in gralloc0_convert_usage()
67 if (usage & GRALLOC_USAGE_PROTECTED) in gralloc0_convert_usage()
69 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) in gralloc0_convert_usage()
72 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) in gralloc0_convert_usage()
74 if (usage & GRALLOC_USAGE_HW_CAMERA_READ) in gralloc0_convert_usage()
76 if (usage & GRALLOC_USAGE_RENDERSCRIPT) in gralloc0_convert_usage()
94 static int gralloc0_alloc(alloc_device_t *dev, int w, int h, int format, int usage, in gralloc0_alloc() argument
105 descriptor.producer_usage = descriptor.consumer_usage = usage; in gralloc0_alloc()
107 descriptor.use_flags = gralloc0_convert_usage(usage); in gralloc0_alloc()
110 if (!supported && (usage & GRALLOC_USAGE_HW_COMPOSER)) { in gralloc0_alloc()
118 format, usage, reinterpret_cast<char *>(&descriptor.drm_format), in gralloc0_alloc()
212 static int gralloc0_lock(struct gralloc_module_t const *module, buffer_handle_t handle, int usage, in gralloc0_lock() argument
215 return module->lockAsync(module, handle, usage, l, t, w, h, vaddr, -1); in gralloc0_lock()
291 int usage, int l, int t, int w, int h, struct android_ycbcr *ycbcr) in gralloc0_lock_ycbcr() argument
293 return module->lockAsync_ycbcr(module, handle, usage, l, t, w, h, ycbcr, -1); in gralloc0_lock_ycbcr()
297 int usage, int l, int t, int w, int h, void **vaddr, int fence_fd) in gralloc0_lock_async() argument
324 map_flags = gralloc0_convert_map_usage(usage); in gralloc0_lock_async()
338 int usage, int l, int t, int w, int h, in gralloc0_lock_async_ycbcr() argument
368 map_flags = gralloc0_convert_map_usage(usage); in gralloc0_lock_async_ycbcr()