Lines Matching refs:usage

51 int gpu_context_t::gralloc_alloc_buffer(unsigned int size, int usage,
69 if ((usage & GRALLOC_USAGE_PROTECTED) &&
70 (usage & GRALLOC_USAGE_PRIVATE_MM_HEAP)) {
78 err = mAllocCtrl->allocate(data, usage);
94 if (usage & GRALLOC_USAGE_PRIVATE_EXTERNAL_ONLY) {
97 if (usage & GRALLOC_USAGE_PRIVATE_INTERNAL_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)) {
159 if (usage & (GRALLOC_USAGE_HW_VIDEO_ENCODER |
203 int gpu_context_t::gralloc_alloc_framebuffer_locked(int usage,
209 if (usage & GRALLOC_HEAP_MASK) {
229 int newUsage = (usage & ~GRALLOC_USAGE_HW_FB) | GRALLOC_USAGE_HW_2D;
265 int gpu_context_t::gralloc_alloc_framebuffer(int usage,
270 int err = gralloc_alloc_framebuffer_locked(usage, pHandle);
275 int gpu_context_t::alloc_impl(int w, int h, int format, int usage,
287 //the usage bits, gralloc assigns a format.
290 if(usage & GRALLOC_USAGE_HW_VIDEO_ENCODER)
292 else if((usage & GRALLOC_USAGE_HW_CAMERA_MASK)
295 else if(usage & GRALLOC_USAGE_HW_CAMERA_READ)
297 else if(usage & GRALLOC_USAGE_HW_CAMERA_WRITE)
299 else if(usage & GRALLOC_USAGE_HW_COMPOSER)
302 //If no other usage flags are detected, default the
309 size = getBufferSizeAndDimensions(w, h, grallocFormat, usage, alignedw,
318 if((usage & GRALLOC_USAGE_HW_FB) &&
327 err = gralloc_alloc_framebuffer(usage, pHandle);
329 err = gralloc_alloc_buffer(size, usage, pHandle, bufferType,
369 int usage, buffer_handle_t* pHandle,
376 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, 0);
379 int format, int usage,
387 return gpu->alloc_impl(w, h, format, usage, pHandle, pStride, bufferSize);