Lines Matching refs:usage
59 int gpu_context_t::gralloc_alloc_buffer(unsigned int size, int usage, in gralloc_alloc_buffer() argument
77 if (usage & GRALLOC_USAGE_PROTECTED) { in gralloc_alloc_buffer()
85 err = mAllocCtrl->allocate(data, usage); in gralloc_alloc_buffer()
101 if (usage & GRALLOC_USAGE_PRIVATE_EXTERNAL_ONLY) { in gralloc_alloc_buffer()
108 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in gralloc_alloc_buffer()
118 if (usage & GRALLOC_USAGE_HW_CAMERA_MASK) { in gralloc_alloc_buffer()
119 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) { in gralloc_alloc_buffer()
131 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER ) { in gralloc_alloc_buffer()
135 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in gralloc_alloc_buffer()
139 if (usage & GRALLOC_USAGE_HW_CAMERA_READ) { in gralloc_alloc_buffer()
143 if (usage & GRALLOC_USAGE_HW_COMPOSER) { in gralloc_alloc_buffer()
147 if (usage & GRALLOC_USAGE_HW_TEXTURE) { in gralloc_alloc_buffer()
151 if(usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY) { in gralloc_alloc_buffer()
155 if(isMacroTileEnabled(format, usage)) { in gralloc_alloc_buffer()
159 if (isUBwcEnabled(format, usage)) { in gralloc_alloc_buffer()
163 if(usage & (GRALLOC_USAGE_SW_READ_MASK | GRALLOC_USAGE_SW_WRITE_MASK)) { in gralloc_alloc_buffer()
167 if (usage & (GRALLOC_USAGE_HW_VIDEO_ENCODER | in gralloc_alloc_buffer()
208 int gpu_context_t::gralloc_alloc_framebuffer_locked(int usage, in gralloc_alloc_framebuffer_locked() argument
214 if (usage & GRALLOC_HEAP_MASK) { in gralloc_alloc_framebuffer_locked()
234 int newUsage = (usage & ~GRALLOC_USAGE_HW_FB) | GRALLOC_USAGE_HW_2D; in gralloc_alloc_framebuffer_locked()
270 int gpu_context_t::gralloc_alloc_framebuffer(int usage, in gralloc_alloc_framebuffer() argument
275 int err = gralloc_alloc_framebuffer_locked(usage, pHandle); in gralloc_alloc_framebuffer()
280 int gpu_context_t::alloc_impl(int w, int h, int format, int usage, in alloc_impl() argument
295 if(usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) in alloc_impl()
297 else if((usage & GRALLOC_USAGE_HW_CAMERA_MASK) in alloc_impl()
300 else if(usage & GRALLOC_USAGE_HW_CAMERA_READ) in alloc_impl()
302 else if(usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in alloc_impl()
308 } else if(usage & GRALLOC_USAGE_HW_COMPOSER) in alloc_impl()
318 size = getBufferSizeAndDimensions(w, h, grallocFormat, usage, alignedw, in alloc_impl()
327 if((usage & GRALLOC_USAGE_HW_FB) && in alloc_impl()
336 err = gralloc_alloc_framebuffer(usage, pHandle); in alloc_impl()
338 err = gralloc_alloc_buffer(size, usage, pHandle, bufferType, in alloc_impl()
383 int usage, buffer_handle_t* pHandle, in gralloc_alloc() argument
390 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, 0); in gralloc_alloc()
393 int format, int usage, in gralloc_alloc_size() argument
401 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, bufferSize); in gralloc_alloc_size()