Lines Matching refs:usage

54 int gpu_context_t::gralloc_alloc_buffer(unsigned int size, int usage,  in gralloc_alloc_buffer()  argument
72 if ((usage & GRALLOC_USAGE_PROTECTED) && in gralloc_alloc_buffer()
73 (usage & GRALLOC_USAGE_PRIVATE_MM_HEAP)) { in gralloc_alloc_buffer()
81 err = mAllocCtrl->allocate(data, usage); in gralloc_alloc_buffer()
97 if (usage & GRALLOC_USAGE_PRIVATE_EXTERNAL_ONLY) { in gralloc_alloc_buffer()
104 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in gralloc_alloc_buffer()
114 if (usage & GRALLOC_USAGE_HW_CAMERA_MASK) { in gralloc_alloc_buffer()
115 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) { in gralloc_alloc_buffer()
127 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER ) { in gralloc_alloc_buffer()
131 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in gralloc_alloc_buffer()
135 if (usage & GRALLOC_USAGE_HW_CAMERA_READ) { in gralloc_alloc_buffer()
139 if (usage & GRALLOC_USAGE_HW_COMPOSER) { in gralloc_alloc_buffer()
143 if (usage & GRALLOC_USAGE_HW_TEXTURE) { in gralloc_alloc_buffer()
147 if(usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY) { in gralloc_alloc_buffer()
151 if(isMacroTileEnabled(format, usage)) { in gralloc_alloc_buffer()
155 if(usage & (GRALLOC_USAGE_SW_READ_MASK | GRALLOC_USAGE_SW_WRITE_MASK)) { in gralloc_alloc_buffer()
192 int gpu_context_t::gralloc_alloc_framebuffer_locked(int usage, in gralloc_alloc_framebuffer_locked() argument
198 if (usage & GRALLOC_HEAP_MASK) { in gralloc_alloc_framebuffer_locked()
218 int newUsage = (usage & ~GRALLOC_USAGE_HW_FB) | GRALLOC_USAGE_HW_2D; in gralloc_alloc_framebuffer_locked()
252 int gpu_context_t::gralloc_alloc_framebuffer(int usage, in gralloc_alloc_framebuffer() argument
257 int err = gralloc_alloc_framebuffer_locked(usage, pHandle); in gralloc_alloc_framebuffer()
262 int gpu_context_t::alloc_impl(int w, int h, int format, int usage, in alloc_impl() argument
277 if(usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) in alloc_impl()
279 else if((usage & GRALLOC_USAGE_HW_CAMERA_MASK) in alloc_impl()
282 else if(usage & GRALLOC_USAGE_HW_CAMERA_READ) in alloc_impl()
284 else if(usage & GRALLOC_USAGE_HW_CAMERA_WRITE) in alloc_impl()
286 else if(usage & GRALLOC_USAGE_HW_COMPOSER) in alloc_impl()
296 size = getBufferSizeAndDimensions(w, h, grallocFormat, usage, alignedw, in alloc_impl()
305 if((usage & GRALLOC_USAGE_HW_FB) && in alloc_impl()
314 err = gralloc_alloc_framebuffer(usage, pHandle); in alloc_impl()
316 err = gralloc_alloc_buffer(size, usage, pHandle, bufferType, in alloc_impl()
356 int usage, buffer_handle_t* pHandle, in gralloc_alloc() argument
363 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, 0); in gralloc_alloc()
366 int format, int usage, in gralloc_alloc_size() argument
374 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, bufferSize); in gralloc_alloc_size()