summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2013-08-27 17:14:27 -0700
committerAndreas Schneider <asn@cryptomilk.org>2015-07-07 13:14:21 +0200
commitef7c7c801b626663d5a3a10c16afa7ea3017b7f5 (patch)
treeb13e0ba5669a31ce97a1bc72b20897b6ecc99c3f
parent2f0629ec7b95de5642d6ebf06eeba251754e4e2b (diff)
downloadandroid_hardware_samsung_slsi_exynos5430-ef7c7c801b626663d5a3a10c16afa7ea3017b7f5.tar.gz
android_hardware_samsung_slsi_exynos5430-ef7c7c801b626663d5a3a10c16afa7ea3017b7f5.tar.xz
android_hardware_samsung_slsi_exynos5430-ef7c7c801b626663d5a3a10c16afa7ea3017b7f5.zip
gralloc: use BGRA byte order for framebuffer target
Bug: 10429036 Change-Id: Idac73fd588cca70e075c017af00dd590b14b0c7e Signed-off-by: Greg Hackmann <ghackmann@google.com>
-rw-r--r--gralloc/gralloc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gralloc/gralloc.cpp b/gralloc/gralloc.cpp
index 20f24bc..cedb742 100644
--- a/gralloc/gralloc.cpp
+++ b/gralloc/gralloc.cpp
@@ -138,6 +138,13 @@ static int gralloc_alloc_rgb(int ionfd, int w, int h, int format, int usage,
int bpp = 0, vstride, fd, err;
unsigned int heap_mask = _select_heap(usage);
+ if (format == HAL_PIXEL_FORMAT_RGBA_8888 && (usage & GRALLOC_USAGE_HW_FB)) {
+ ALOGW_IF(usage & (GRALLOC_USAGE_SW_READ_MASK |
+ GRALLOC_USAGE_SW_WRITE_MASK),
+ "framebuffer target should not have SW usage bits; ignoring");
+ format = HAL_PIXEL_FORMAT_BGRA_8888;
+ }
+
switch (format) {
case HAL_PIXEL_FORMAT_EXYNOS_ARGB_8888:
case HAL_PIXEL_FORMAT_RGBA_8888: