summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorST-Ericsson <void@stericsson.com>2011-12-12 16:21:01 +0100
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2011-12-19 13:21:58 +0059
commitdbbe22940ee066d78c91819fea92c63cf93553d8 (patch)
tree2e01a1c221ce4576994330aeb8e50d7da5d8e107
parentbdf6343a54e91a9e55099b873b2278e5acc4eef1 (diff)
downloadlibhardware-dbbe22940ee066d78c91819fea92c63cf93553d8.tar.gz
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 <patrik.ryd@stericsson.com>
-rw-r--r--include/hardware/fb.h31
-rw-r--r--include/hardware/gralloc.h8
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 f8beb5ef..baf18035 100644
--- a/include/hardware/gralloc.h
+++ b/include/hardware/gralloc.h
@@ -102,6 +102,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