Encode header version in api versions
Change-Id: I0216bef3ba0cfaed2fe908f735e546d0734c0b13
This commit is contained in:
parent
b8b6439598
commit
3f5b522ac9
2 changed files with 17 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue