diff options
author | ST-Ericsson <void@stericsson.com> | 2011-12-12 16:21:25 +0100 |
---|---|---|
committer | Patrik Ryd <patrik.ryd@linaro.org> | 2011-12-13 16:17:47 +0100 |
commit | 845c1511151677ddb98035f932d263d8fe962213 (patch) | |
tree | 0f4a1259fb3699423c6e2fd0c83c8c268a8d8ae2 | |
parent | d44066f617faa4b32cf802458b851e6563af93c2 (diff) | |
download | libhardware-linaro_android_4.0.1_snowball.tar.gz |
Gralloc: Adding required ST-Ericsson changes to gralloc.linaro_android_4.0.1_snowball
The required ST-Ericsson changes in the gralloc headers has been added.
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
-rw-r--r-- | include/hardware/fb.h | 31 | ||||
-rw-r--r-- | 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 |