Lines Matching refs:usage
58 int gpu_context_t::gralloc_alloc_buffer(unsigned int size, int usage, in gralloc_alloc_buffer() argument
74 if (usage & GRALLOC_USAGE_PROTECTED) { in gralloc_alloc_buffer()
75 if (usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY) { in gralloc_alloc_buffer()
86 err = mAllocCtrl->allocate(data, usage); in gralloc_alloc_buffer()
102 if (usage & GRALLOC_USAGE_PRIVATE_EXTERNAL_ONLY) { in gralloc_alloc_buffer()
106 if (usage & GRALLOC_USAGE_PRIVATE_INTERNAL_ONLY) { in gralloc_alloc_buffer()
110 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER ) { in gralloc_alloc_buffer()
114 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in gralloc_alloc_buffer()
118 if (usage & GRALLOC_USAGE_HW_CAMERA_READ) { in gralloc_alloc_buffer()
122 if (usage & GRALLOC_USAGE_HW_COMPOSER) { in gralloc_alloc_buffer()
126 if (usage & GRALLOC_USAGE_HW_TEXTURE) { in gralloc_alloc_buffer()
130 if(usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY) { in gralloc_alloc_buffer()
134 if(isMacroTileEnabled(format, usage)) { in gralloc_alloc_buffer()
138 if (isUBwcEnabled(format, usage)) { in gralloc_alloc_buffer()
142 if(usage & (GRALLOC_USAGE_SW_READ_MASK | GRALLOC_USAGE_SW_WRITE_MASK)) { in gralloc_alloc_buffer()
146 if (usage & (GRALLOC_USAGE_HW_VIDEO_ENCODER | in gralloc_alloc_buffer()
153 if(usage & GRALLOC_USAGE_HW_COMPOSER) { in gralloc_alloc_buffer()
192 int gpu_context_t::gralloc_alloc_framebuffer_locked(int usage, in gralloc_alloc_framebuffer_locked() argument
215 int newUsage = (usage & ~GRALLOC_USAGE_HW_FB) | GRALLOC_USAGE_HW_2D; in gralloc_alloc_framebuffer_locked()
251 int gpu_context_t::gralloc_alloc_framebuffer(int usage, in gralloc_alloc_framebuffer() argument
256 int err = gralloc_alloc_framebuffer_locked(usage, pHandle); in gralloc_alloc_framebuffer()
261 int gpu_context_t::alloc_impl(int w, int h, int format, int usage, in alloc_impl() argument
276 if (usage & GRALLOC_USAGE_PRIVATE_ALLOC_UBWC) in alloc_impl()
278 else if(usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) in alloc_impl()
280 else if((usage & GRALLOC_USAGE_HW_CAMERA_MASK) in alloc_impl()
283 else if(usage & GRALLOC_USAGE_HW_CAMERA_READ) in alloc_impl()
285 else if(usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in alloc_impl()
291 } else if(usage & GRALLOC_USAGE_HW_COMPOSER) in alloc_impl()
304 if (usage & GRALLOC_USAGE_HW_FB) { in alloc_impl()
310 usage &= ~GRALLOC_USAGE_PRIVATE_ALLOC_UBWC; in alloc_impl()
315 usage |= GRALLOC_USAGE_PRIVATE_ALLOC_UBWC; in alloc_impl()
322 size = getBufferSizeAndDimensions(w, h, grallocFormat, usage, alignedw, in alloc_impl()
331 err = gralloc_alloc_framebuffer(usage, pHandle); in alloc_impl()
333 err = gralloc_alloc_buffer(size, usage, pHandle, bufferType, in alloc_impl()
378 int usage, buffer_handle_t* pHandle, in gralloc_alloc() argument
385 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, 0); in gralloc_alloc()
388 int format, int usage, in gralloc_alloc_size() argument
396 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, bufferSize); in gralloc_alloc_size()