From c92339fb57b0b8516efaf9db9d7ab2df9a12b5be Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Mon, 20 Feb 2012 12:16:48 +0530 Subject: [PATCH] gralloc: Allow temporary buffer to choose to be cached The flag GRALLOC_USAGE_PRIVATE_UNCACHED can be set in the usage to allow it to be uncached. If not set, the buffer will be cached by default. CRs-fixed: 341196 (cherry picked from commit 6232816aadd311dbb57b714c7c0a4073d3ddc7f7) Change-Id: Ic10677d105328702972dd69581b919c984d17fe9 --- libgralloc/alloc_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgralloc/alloc_controller.cpp b/libgralloc/alloc_controller.cpp index 1ff19d8..1a5fe25 100644 --- a/libgralloc/alloc_controller.cpp +++ b/libgralloc/alloc_controller.cpp @@ -412,7 +412,7 @@ int alloc_buffer(private_handle_t **pHnd, int w, int h, int format, int usage) data.offset = 0; data.size = getBufferSizeAndDimensions(w, h, format, alignedw, alignedh); data.align = getpagesize(); - data.uncached = true; + data.uncached = useUncached(usage); int allocFlags = usage; int err = sAlloc->allocate(data, allocFlags, 0);