diff options
Diffstat (limited to 'libs/ui/GraphicBufferAllocator.cpp')
-rw-r--r-- | libs/ui/GraphicBufferAllocator.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp index fb43410..2ea5696 100644 --- a/libs/ui/GraphicBufferAllocator.cpp +++ b/libs/ui/GraphicBufferAllocator.cpp @@ -199,6 +199,16 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h, PixelFormat forma w = h = 1; // we have a h/w allocator and h/w buffer is requested + +#ifdef EXYNOS4_ENHANCEMENTS + if ((format == 0x101) || (format == 0x105) || (format == 0x107)) { + // 0x101 = HAL_PIXEL_FORMAT_YCbCr_420_P (Samsung-specific pixel format) + // 0x105 = HAL_PIXEL_FORMAT_YCbCr_420_SP (Samsung-specific pixel format) + // 0x107 = HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED (Samsung-specific pixel format) + usage |= GRALLOC_USAGE_HW_FIMC1; // Exynos HWC wants FIMC-friendly memory allocation + } +#endif + status_t err; // If too many async frees are queued up then wait for some of them to |