Lines Matching refs:usage
55 int gpu_context_t::gralloc_alloc_buffer(size_t size, int usage, in gralloc_alloc_buffer() argument
73 if ((usage & GRALLOC_USAGE_PROTECTED) && in gralloc_alloc_buffer()
74 (usage & GRALLOC_USAGE_PRIVATE_MM_HEAP)) { in gralloc_alloc_buffer()
82 err = mAllocCtrl->allocate(data, usage); in gralloc_alloc_buffer()
98 if (usage & GRALLOC_USAGE_PRIVATE_EXTERNAL_ONLY) { in gralloc_alloc_buffer()
105 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in gralloc_alloc_buffer()
115 if (usage & GRALLOC_USAGE_HW_CAMERA_MASK) { in gralloc_alloc_buffer()
116 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) { in gralloc_alloc_buffer()
128 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER ) { in gralloc_alloc_buffer()
132 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in gralloc_alloc_buffer()
136 if (usage & GRALLOC_USAGE_HW_CAMERA_READ) { in gralloc_alloc_buffer()
140 if (usage & GRALLOC_USAGE_HW_COMPOSER) { in gralloc_alloc_buffer()
144 if (usage & GRALLOC_USAGE_HW_TEXTURE) { in gralloc_alloc_buffer()
148 if(usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY) { in gralloc_alloc_buffer()
152 if(isMacroTileEnabled(format, usage)) { in gralloc_alloc_buffer()
189 int gpu_context_t::gralloc_alloc_framebuffer_locked(int usage, in gralloc_alloc_framebuffer_locked() argument
195 if (usage & GRALLOC_HEAP_MASK) { in gralloc_alloc_framebuffer_locked()
215 int newUsage = (usage & ~GRALLOC_USAGE_HW_FB) | GRALLOC_USAGE_HW_2D; in gralloc_alloc_framebuffer_locked()
249 int gpu_context_t::gralloc_alloc_framebuffer(int usage, in gralloc_alloc_framebuffer() argument
254 int err = gralloc_alloc_framebuffer_locked(usage, pHandle); in gralloc_alloc_framebuffer()
259 int gpu_context_t::alloc_impl(int w, int h, int format, int usage, in alloc_impl() argument
274 if(usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) in alloc_impl()
276 else if((usage & GRALLOC_USAGE_HW_CAMERA_MASK) in alloc_impl()
279 else if(usage & GRALLOC_USAGE_HW_CAMERA_READ) in alloc_impl()
281 else if(usage & GRALLOC_USAGE_HW_CAMERA_WRITE) in alloc_impl()
283 else if(usage & GRALLOC_USAGE_HW_COMPOSER) in alloc_impl()
287 (usage & GRALLOC_USAGE_SW_WRITE_MASK || in alloc_impl()
288 usage & GRALLOC_USAGE_SW_READ_MASK)) { in alloc_impl()
294 size = getBufferSizeAndDimensions(w, h, grallocFormat, usage, alignedw, in alloc_impl()
303 if((usage & GRALLOC_USAGE_HW_FB) && in alloc_impl()
312 err = gralloc_alloc_framebuffer(usage, pHandle); in alloc_impl()
314 err = gralloc_alloc_buffer(size, usage, pHandle, bufferType, in alloc_impl()
353 int usage, buffer_handle_t* pHandle, in gralloc_alloc() argument
360 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, 0); in gralloc_alloc()
363 int format, int usage, in gralloc_alloc_size() argument
371 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, bufferSize); in gralloc_alloc_size()