summaryrefslogtreecommitdiffstats
path: root/include/hardware/hwcomposer_defs.h
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2012-08-29 10:37:37 -0700
committerJesse Hall <jessehall@google.com>2012-08-31 09:25:46 -0700
commit2c13759c61dd111efc9509ddf37330f50f706f64 (patch)
treee0be7f9bd74304445c0fb3c8cd8c05f93a860548 /include/hardware/hwcomposer_defs.h
parent3f5b522ac9a472de756c08b16f357acd6dc26e34 (diff)
downloadhardware_libhardware-2c13759c61dd111efc9509ddf37330f50f706f64.zip
hardware_libhardware-2c13759c61dd111efc9509ddf37330f50f706f64.tar.gz
hardware_libhardware-2c13759c61dd111efc9509ddf37330f50f706f64.tar.bz2
Add new HWC 1.1 queries and hotplug callback
Change-Id: I40164e60b33174e98a3843ec99f1680b1bb1c675
Diffstat (limited to 'include/hardware/hwcomposer_defs.h')
-rw-r--r--include/hardware/hwcomposer_defs.h39
1 files changed, 33 insertions, 6 deletions
diff --git a/include/hardware/hwcomposer_defs.h b/include/hardware/hwcomposer_defs.h
index bd9f41c..04f4c2c 100644
--- a/include/hardware/hwcomposer_defs.h
+++ b/include/hardware/hwcomposer_defs.h
@@ -132,24 +132,51 @@ enum {
/* attributes queriable with query() */
enum {
/*
- * availability: HWC_DEVICE_API_VERSION_0_2
- * must return 1 if the background layer is supported, 0 otherwise
+ * Availability: HWC_DEVICE_API_VERSION_0_2
+ * Must return 1 if the background layer is supported, 0 otherwise.
*/
HWC_BACKGROUND_LAYER_SUPPORTED = 0,
/*
- * availability: HWC_DEVICE_API_VERSION_0_3
- * returns the vsync period in nanosecond
+ * Availability: HWC_DEVICE_API_VERSION_0_3
+ * Returns the vsync period in nanoseconds.
+ *
+ * This query is not used for HWC_DEVICE_API_VERSION_1_1 and later.
+ * Instead, the per-display attribute HWC_DISPLAY_VSYNC_PERIOD is used.
*/
HWC_VSYNC_PERIOD = 1,
/*
- * availability: HWC_DEVICE_API_VERSION_1_1
- * returns a mask of supported display types
+ * Availability: HWC_DEVICE_API_VERSION_1_1
+ * Returns a mask of supported display types.
*/
HWC_DISPLAY_TYPES_SUPPORTED = 2,
};
+/* display attributes returned by getDisplayAttributes() */
+enum {
+ /* Indicates the end of an attribute list */
+ HWC_DISPLAY_NO_ATTRIBUTE = 0,
+
+ /* The vsync period in nanoseconds */
+ HWC_DISPLAY_VSYNC_PERIOD = 1,
+
+ /* The number of pixels in the horizontal and vertical directions. */
+ HWC_DISPLAY_RESOLUTION_X = 2,
+ HWC_DISPLAY_RESOLUTION_Y = 3,
+
+ /* The number of pixels per thousand inches of this configuration.
+ *
+ * Scaling DPI by 1000 allows it to be stored in an int without losing
+ * too much precision.
+ *
+ * If the DPI for a configuration is unavailable or the HWC implementation
+ * considers it unreliable, it should set these attributes to zero.
+ */
+ HWC_DISPLAY_DPI_X = 4,
+ HWC_DISPLAY_DPI_Y = 5,
+};
+
/* Allowed events for hwc_methods::eventControl() */
enum {
HWC_EVENT_VSYNC = 0