diff options
| author | 2015-06-01 18:31:19 +0000 | |
|---|---|---|
| committer | 2015-06-01 18:31:19 +0000 | |
| commit | 2daeb124818ade7b83deaa9decd1592473ec19f3 (patch) | |
| tree | b0b9924354601ba77827b309739d3ee4a8dc57d1 /libs | |
| parent | 04bb7a9a4195de14e11e2ea9a9439b9e43e9f660 (diff) | |
| parent | edcfe7c513a111890b7bd245cf10fa105e910277 (diff) | |
am edcfe7c5: Merge "libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc"
* commit 'edcfe7c513a111890b7bd245cf10fa105e910277':
libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/ui/GraphicBufferAllocator.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp index 85e967567e..9b265af2b4 100644 --- a/libs/ui/GraphicBufferAllocator.cpp +++ b/libs/ui/GraphicBufferAllocator.cpp @@ -104,6 +104,9 @@ status_t GraphicBufferAllocator::alloc(uint32_t width, uint32_t height, // we have a h/w allocator and h/w buffer is requested status_t err; + // Filter out any usage bits that should not be passed to the gralloc module + usage &= GRALLOC_USAGE_ALLOC_MASK; + int outStride = 0; err = mAllocDev->alloc(mAllocDev, static_cast<int>(width), static_cast<int>(height), format, static_cast<int>(usage), handle, |