diff options
author | Jesse Hall <jessehall@google.com> | 2012-08-30 13:53:13 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-08-30 13:53:14 -0700 |
commit | 673a810469947edb32fde9326c44eb326b5d2b1a (patch) | |
tree | 9df13c12a3bff5502ff618e1cb70a68813651149 /include/hardware | |
parent | 2388a2dc91979364d96e49456b189f904f0267f3 (diff) | |
parent | 3f5b522ac9a472de756c08b16f357acd6dc26e34 (diff) | |
download | hardware_libhardware-673a810469947edb32fde9326c44eb326b5d2b1a.zip hardware_libhardware-673a810469947edb32fde9326c44eb326b5d2b1a.tar.gz hardware_libhardware-673a810469947edb32fde9326c44eb326b5d2b1a.tar.bz2 |
Merge "Encode header version in api versions" into jb-mr1-dev
Diffstat (limited to 'include/hardware')
-rw-r--r-- | include/hardware/hardware.h | 8 | ||||
-rw-r--r-- | include/hardware/hwcomposer_defs.h | 15 |
2 files changed, 17 insertions, 6 deletions
diff --git a/include/hardware/hardware.h b/include/hardware/hardware.h index 78c4572..416ae39 100644 --- a/include/hardware/hardware.h +++ b/include/hardware/hardware.h @@ -37,6 +37,12 @@ __BEGIN_DECLS #define HARDWARE_MAKE_API_VERSION(maj,min) \ ((((maj) & 0xff) << 8) | ((min) & 0xff)) +#define HARDWARE_MAKE_API_VERSION_2(maj,min,hdr) \ + ((((maj) & 0xff) << 24) | (((min) & 0xff) << 16) | ((hdr) & 0xffff)) +#define HARDWARE_API_VERSION_2_MAJ_MIN_MASK 0xffff0000 +#define HARDWARE_API_VERSION_2_HEADER_MASK 0x0000ffff + + /* * The current HAL API version. * @@ -60,11 +66,13 @@ __BEGIN_DECLS * Use this macro to set the hw_module_t.module_api_version field. */ #define HARDWARE_MODULE_API_VERSION(maj,min) HARDWARE_MAKE_API_VERSION(maj,min) +#define HARDWARE_MODULE_API_VERSION_2(maj,min,hdr) HARDWARE_MAKE_API_VERSION_2(maj,min,hdr) /* * Use this macro to set the hw_device_t.version field */ #define HARDWARE_DEVICE_API_VERSION(maj,min) HARDWARE_MAKE_API_VERSION(maj,min) +#define HARDWARE_DEVICE_API_VERSION_2(maj,min,hdr) HARDWARE_MAKE_API_VERSION_2(maj,min,hdr) struct hw_module_t; struct hw_module_methods_t; diff --git a/include/hardware/hwcomposer_defs.h b/include/hardware/hwcomposer_defs.h index f0f97fc..bd9f41c 100644 --- a/include/hardware/hwcomposer_defs.h +++ b/include/hardware/hwcomposer_defs.h @@ -28,13 +28,16 @@ __BEGIN_DECLS /*****************************************************************************/ -#define HWC_MODULE_API_VERSION_0_1 HARDWARE_MODULE_API_VERSION(0, 1) +#define HWC_HEADER_VERSION 1 -#define HWC_DEVICE_API_VERSION_0_1 HARDWARE_DEVICE_API_VERSION(0, 1) -#define HWC_DEVICE_API_VERSION_0_2 HARDWARE_DEVICE_API_VERSION(0, 2) -#define HWC_DEVICE_API_VERSION_0_3 HARDWARE_DEVICE_API_VERSION(0, 3) -#define HWC_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION(1, 0) -#define HWC_DEVICE_API_VERSION_1_1 HARDWARE_DEVICE_API_VERSION(1, 1) +#define HWC_MODULE_API_VERSION_0_1 HARDWARE_MODULE_API_VERSION_2(0, 1, HWC_HEADER_VERSION) + +#define HWC_DEVICE_API_VERSION_0_1 HARDWARE_DEVICE_API_VERSION_2(0, 1, HWC_HEADER_VERSION) +#define HWC_DEVICE_API_VERSION_0_2 HARDWARE_DEVICE_API_VERSION_2(0, 2, HWC_HEADER_VERSION) +#define HWC_DEVICE_API_VERSION_0_3 HARDWARE_DEVICE_API_VERSION_2(0, 3, HWC_HEADER_VERSION) +#define HWC_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION_2(1, 0, HWC_HEADER_VERSION) +#define HWC_DEVICE_API_VERSION_1_1 HARDWARE_DEVICE_API_VERSION_2(1, 1, HWC_HEADER_VERSION) +#define HWC_DEVICE_API_VERSION_1_2 HARDWARE_DEVICE_API_VERSION_2(1, 2, HWC_HEADER_VERSION) enum { /* hwc_composer_device_t::set failed in EGL */ |