libgralloc: Allocate buffer Fix.

Fix to allocate buffer of size defined by the client using
NATIVE_WINDOW_SET_BUFFER_SIZE property function.

Change-Id: I29f3e7e85c2f8dd7c11149d78b2681e6478cef78
This commit is contained in:
Ramkumar Radhakrishnan 2012-08-09 20:43:08 -07:00 committed by Andrew Sutherland
parent 1759ea1ab0
commit 9445335019

View File

@ -200,7 +200,7 @@ int gpu_context_t::alloc_impl(int w, int h, int format, int usage,
if ((ssize_t)size <= 0)
return -EINVAL;
size = (bufferSize >= size)? bufferSize : size;
size = (bufferSize != 0)? bufferSize : size;
// All buffers marked as protected or for external
// display need to go to overlay