diff options
author | codeworkx <codeworkx@cyanogenmod.org> | 2012-11-27 11:58:03 +0100 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.org> | 2012-11-27 11:58:03 +0100 |
commit | f792059f3a98e55435b221c899c04dbb4103aef7 (patch) | |
tree | 926063f62122d40896b22d4ecb217dac0d0f9028 /libs | |
parent | c49d996166e49a82266b488a58779ecff5b2a06d (diff) | |
download | frameworks_native-f792059f3a98e55435b221c899c04dbb4103aef7.zip frameworks_native-f792059f3a98e55435b221c899c04dbb4103aef7.tar.gz frameworks_native-f792059f3a98e55435b221c899c04dbb4103aef7.tar.bz2 |
GraphicBuffer: exynos4: set FIMC1 usage bit on samsung specific formats
Change-Id: Ia8cde7e594f8be464ef15eaae453872ee5aa2768
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ui/GraphicBufferAllocator.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp index ff550d9..7d6507d 100644 --- a/libs/ui/GraphicBufferAllocator.cpp +++ b/libs/ui/GraphicBufferAllocator.cpp @@ -101,7 +101,15 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat forma // we have a h/w allocator and h/w buffer is requested status_t err; - + +#ifdef EXYNOS4_ENHANCEMENTS + if ((format == 0x101) || (format == 0x105)) { + // 0x101 = HAL_PIXEL_FORMAT_YCbCr_420_P (Samsung-specific pixel format) + // 0x105 = HAL_PIXEL_FORMAT_YCbCr_420_SP (Samsung-specific pixel format) + usage |= GRALLOC_USAGE_HW_FIMC1; // Exynos HWC wants FIMC-friendly memory allocation + } +#endif + err = mAllocDev->alloc(mAllocDev, w, h, format, usage, handle, stride); ALOGW_IF(err, "alloc(%u, %u, %d, %08x, ...) failed %d (%s)", |