[Mesa-dev] [PATCH v3 5/6] android: Change gralloc_handle_t format from Android format to fourcc

Robert Foss robert.foss at collabora.com
Tue Feb 6 15:20:58 UTC 2018


Change the gralloc_handle_t format to signify the fourcc pixel format
code instead of the Android pixel format definition.

This is desirable since the fourcc code is what is used within the DRM
subsystem. Naturally translation will still have to happen somewhere.

Also bump the gralloc_handle_t version.

Sign-off-by: Robert Foss <robert.foss at collabora.com>
---
 android/gralloc_handle.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android/gralloc_handle.h b/android/gralloc_handle.h
index 9648b006c982..60895a0a5255 100644
--- a/android/gralloc_handle.h
+++ b/android/gralloc_handle.h
@@ -56,7 +56,7 @@ struct gralloc_handle_t {
 
 	int width; /* width of buffer in pixels */
 	int height; /* height of buffer in pixels */
-	int format; /* pixel format (Android) */
+	int format; /* pixel format (fourcc) */
 	int usage; /* android libhardware usage flags */
 
 	int stride; /* the stride in bytes */
@@ -69,7 +69,7 @@ struct gralloc_handle_t {
 	} __attribute__((aligned(8)));
 };
 
-#define GRALLOC_HANDLE_VERSION 2
+#define GRALLOC_HANDLE_VERSION 3
 #define GRALLOC_HANDLE_MAGIC 0x60585350
 #define GRALLOC_HANDLE_NUM_FDS 1
 #define GRALLOC_HANDLE_NUM_INTS (	\
-- 
2.14.1



More information about the mesa-dev mailing list