Lines Matching refs:usage
54 int gpu_context_t::gralloc_alloc_buffer(unsigned int size, int usage,
72 if ((usage & GRALLOC_USAGE_PROTECTED) &&
73 (usage & GRALLOC_USAGE_PRIVATE_MM_HEAP)) {
81 err = mAllocCtrl->allocate(data, usage);
97 if (usage & GRALLOC_USAGE_PRIVATE_EXTERNAL_ONLY) {
104 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) {
114 if (usage & GRALLOC_USAGE_HW_CAMERA_MASK) {
115 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) {
127 if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER ) {
131 if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE) {
135 if (usage & GRALLOC_USAGE_HW_CAMERA_READ) {
139 if (usage & GRALLOC_USAGE_HW_COMPOSER) {
143 if (usage & GRALLOC_USAGE_HW_TEXTURE) {
147 if(usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY) {
151 if(isMacroTileEnabled(format, usage)) {
155 if(usage & (GRALLOC_USAGE_SW_READ_MASK | GRALLOC_USAGE_SW_WRITE_MASK)) {
192 int gpu_context_t::gralloc_alloc_framebuffer_locked(int usage,
198 if (usage & GRALLOC_HEAP_MASK) {
218 int newUsage = (usage & ~GRALLOC_USAGE_HW_FB) | GRALLOC_USAGE_HW_2D;
252 int gpu_context_t::gralloc_alloc_framebuffer(int usage,
257 int err = gralloc_alloc_framebuffer_locked(usage, pHandle);
262 int gpu_context_t::alloc_impl(int w, int h, int format, int usage,
274 //the usage bits, gralloc assigns a format.
277 if(usage & GRALLOC_USAGE_HW_VIDEO_ENCODER)
279 else if((usage & GRALLOC_USAGE_HW_CAMERA_MASK)
282 else if(usage & GRALLOC_USAGE_HW_CAMERA_READ)
284 else if(usage & GRALLOC_USAGE_HW_CAMERA_WRITE)
286 else if(usage & GRALLOC_USAGE_HW_COMPOSER)
290 // If no other usage flags are detected, default the flexible YUV
296 size = getBufferSizeAndDimensions(w, h, grallocFormat, usage, alignedw,
305 if((usage & GRALLOC_USAGE_HW_FB) &&
314 err = gralloc_alloc_framebuffer(usage, pHandle);
316 err = gralloc_alloc_buffer(size, usage, pHandle, bufferType,
356 int usage, buffer_handle_t* pHandle,
363 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, 0);
366 int format, int usage,
374 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, bufferSize);