Merge "Remove support for legacy HWC version encoding"
This commit is contained in:
commit
cbe5135610
@ -48,25 +48,15 @@
|
|||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
|
|
||||||
#define MIN_HWC_HEADER_VERSION 0
|
#define MIN_HWC_HEADER_VERSION HWC_HEADER_VERSION
|
||||||
|
|
||||||
static uint32_t hwcApiVersion(const hwc_composer_device_1_t* hwc) {
|
static uint32_t hwcApiVersion(const hwc_composer_device_1_t* hwc) {
|
||||||
uint32_t hwcVersion = hwc->common.version;
|
uint32_t hwcVersion = hwc->common.version;
|
||||||
if (MIN_HWC_HEADER_VERSION == 0 &&
|
|
||||||
(hwcVersion & HARDWARE_API_VERSION_2_MAJ_MIN_MASK) == 0) {
|
|
||||||
// legacy version encoding
|
|
||||||
hwcVersion <<= 16;
|
|
||||||
}
|
|
||||||
return hwcVersion & HARDWARE_API_VERSION_2_MAJ_MIN_MASK;
|
return hwcVersion & HARDWARE_API_VERSION_2_MAJ_MIN_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t hwcHeaderVersion(const hwc_composer_device_1_t* hwc) {
|
static uint32_t hwcHeaderVersion(const hwc_composer_device_1_t* hwc) {
|
||||||
uint32_t hwcVersion = hwc->common.version;
|
uint32_t hwcVersion = hwc->common.version;
|
||||||
if (MIN_HWC_HEADER_VERSION == 0 &&
|
|
||||||
(hwcVersion & HARDWARE_API_VERSION_2_MAJ_MIN_MASK) == 0) {
|
|
||||||
// legacy version encoding
|
|
||||||
hwcVersion <<= 16;
|
|
||||||
}
|
|
||||||
return hwcVersion & HARDWARE_API_VERSION_2_HEADER_MASK;
|
return hwcVersion & HARDWARE_API_VERSION_2_HEADER_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user