Lines Matching refs:usage
51 int gpu_context_t::gralloc_alloc_buffer(unsigned int size, int usage, in gralloc_alloc_buffer() argument
63 usage, in gralloc_alloc_buffer()
77 if (usage & GRALLOC_USAGE_PROTECTED) { in gralloc_alloc_buffer()
78 if ((usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY) || in gralloc_alloc_buffer()
79 (usage & GRALLOC_USAGE_HW_CAMERA_MASK)) { in gralloc_alloc_buffer()
90 err = mAllocCtrl->allocate(data, usage); in gralloc_alloc_buffer()
106 if (usage & GRALLOC_USAGE_PRIVATE_EXTERNAL_ONLY) { in gralloc_alloc_buffer()
110 if (usage & GRALLOC_USAGE_PRIVATE_INTERNAL_ONLY) { in gralloc_alloc_buffer()
114 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER ) { in gralloc_alloc_buffer()
118 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in gralloc_alloc_buffer()
122 if (usage & GRALLOC_USAGE_HW_CAMERA_READ) { in gralloc_alloc_buffer()
126 if (usage & GRALLOC_USAGE_HW_COMPOSER) { in gralloc_alloc_buffer()
130 if (usage & GRALLOC_USAGE_HW_TEXTURE) { in gralloc_alloc_buffer()
134 if(usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY) { 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()
190 int gpu_context_t::gralloc_alloc_framebuffer_locked(int usage, in gralloc_alloc_framebuffer_locked() argument
213 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_PRIVATE_ALLOC_UBWC) in alloc_impl()
276 else if(usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) { in alloc_impl()
279 usage & GRALLOC_USAGE_HW_COMPOSER) in alloc_impl()
283 } else if((usage & GRALLOC_USAGE_HW_CAMERA_MASK) in alloc_impl()
286 else if(usage & GRALLOC_USAGE_HW_CAMERA_READ) in alloc_impl()
288 else if(usage & GRALLOC_USAGE_HW_CAMERA_WRITE) { in alloc_impl()
294 } else if(usage & GRALLOC_USAGE_HW_COMPOSER) in alloc_impl()
307 if (usage & GRALLOC_USAGE_HW_FB) { in alloc_impl()
313 usage &= ~GRALLOC_USAGE_PRIVATE_ALLOC_UBWC; in alloc_impl()
318 usage |= GRALLOC_USAGE_PRIVATE_ALLOC_UBWC; in alloc_impl()
325 size = getBufferSizeAndDimensions(w, h, grallocFormat, usage, alignedw, in alloc_impl()
334 err = gralloc_alloc_framebuffer(usage, pHandle); in alloc_impl()
336 err = gralloc_alloc_buffer(size, usage, pHandle, bufferType, in alloc_impl()
377 int usage, buffer_handle_t* pHandle, in gralloc_alloc() argument
384 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, 0); in gralloc_alloc()
387 int format, int usage, in gralloc_alloc_size() argument
395 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, bufferSize); in gralloc_alloc_size()