From 845c1511151677ddb98035f932d263d8fe962213 Mon Sep 17 00:00:00 2001 From: ST-Ericsson Date: Mon, 12 Dec 2011 16:21:25 +0100 Subject: Gralloc: Adding required ST-Ericsson changes to gralloc. The required ST-Ericsson changes in the gralloc headers has been added. Signed-off-by: Patrik Ryd --- include/hardware/fb.h | 31 +++++++++++++++++++++++++------ include/hardware/gralloc.h | 8 ++++++++ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/include/hardware/fb.h b/include/hardware/fb.h index ba2f286d..79900af2 100644 --- a/include/hardware/fb.h +++ b/include/hardware/fb.h @@ -42,18 +42,18 @@ typedef struct framebuffer_device_t { const uint32_t flags; /* dimensions of the framebuffer in pixels */ - const uint32_t width; - const uint32_t height; + uint32_t width; + uint32_t height; /* frambuffer stride in pixels */ - const int stride; + int stride; /* framebuffer pixel format */ const int format; /* resolution of the framebuffer's display panel in pixel per inch*/ - const float xdpi; - const float ydpi; + float xdpi; + float ydpi; /* framebuffer's display panel refresh rate in frames per second */ const float fps; @@ -141,7 +141,26 @@ typedef struct framebuffer_device_t { */ int (*enableScreen)(struct framebuffer_device_t* dev, int enable); - void* reserved_proc[6]; + /* + * Sets the number of degrees ccw the framebuffer shall be rotated before + * being sent to the display. This call may change the framebuffer's + * dimensions. + */ + int (*rotate)(struct framebuffer_device_t* dev, unsigned int absolute_degree); + + /* + * Informs gralloc about the UI rotation. This is needed in the mirroring use + * case to get the correct orientation on the external device, e.g. HDMI. + */ + void (*UIRotationChange)(struct framebuffer_device_t* dev, int uiRotation); + + /* + * Enables the mirroring of the main display content to an external device, + * e.g. HDMI. + */ + void (*enableHDMIMirroring)(struct framebuffer_device_t* dev, int enable); + + void* reserved_proc[8]; } framebuffer_device_t; diff --git a/include/hardware/gralloc.h b/include/hardware/gralloc.h index 9daad1c8..08b7ac8e 100644 --- a/include/hardware/gralloc.h +++ b/include/hardware/gralloc.h @@ -100,6 +100,14 @@ enum { /*****************************************************************************/ +enum { + /* FIXME: this only exists to work-around some issues with + * the video and camera frameworks. don't implement unless + * you know what you're doing. + */ + GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER = 0x080000001, +}; + /** * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM * and the fields of this data structure must begin with hw_module_t -- cgit v1.2.3