Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3dda454 authored by Bruno Martins's avatar Bruno Martins
Browse files

Hookup GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE

The gralloc struct has been conditionally adjusted not to
break blobs that use the old struct.

So far only GRALLOC_HANDLE_HAS_RESERVED_SIZE was hooked up
for Google Pixels, but it's now time to hook up the remaining flag.

Change-Id: I175bd328bd9733b9487e349f7a8486f15ef0a450
parent 8bbb7d90
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -88,6 +88,23 @@ gralloc_10_usage_bits {
    },
}

soong_config_module_type {
    name: "gralloc_handle_custom_content_md_reserved_size",
    module_type: "cc_defaults",
    config_namespace: "lineageGlobalVars",
    bool_variables: ["gralloc_handle_has_custom_content_md_reserved_size"],
    properties: ["export_cflags"],
}

gralloc_handle_custom_content_md_reserved_size {
    name: "gralloc_handle_has_custom_content_md_reserved_size_defaults",
    soong_config_variables: {
        gralloc_handle_has_custom_content_md_reserved_size: {
            export_cflags: ["-DGRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE"],
        },
    },
}

soong_config_module_type {
    name: "gralloc_handle_reserved_size",
    module_type: "cc_defaults",
+3 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ SOONG_CONFIG_lineageGlobalVars += \
    aapt_version_code \
    additional_gralloc_10_usage_bits \
    bootloader_message_offset \
    gralloc_handle_has_custom_content_md_reserved_size \
    gralloc_handle_has_reserved_size \
    target_health_charging_control_charging_path \
    target_health_charging_control_charging_enabled \
@@ -63,6 +64,7 @@ SOONG_CONFIG_lineageQcomVars += \
endif

# Soong bool variables
SOONG_CONFIG_lineageGlobalVars_gralloc_handle_has_custom_content_md_reserved_size := $(TARGET_GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE)
SOONG_CONFIG_lineageGlobalVars_gralloc_handle_has_reserved_size := $(TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE)
SOONG_CONFIG_lineageGlobalVars_uses_egl_display_array := $(TARGET_USES_EGL_DISPLAY_ARRAY)
SOONG_CONFIG_lineageNvidiaVars_uses_nvidia_enhancements := $(NV_ANDROID_FRAMEWORK_ENHANCEMENTS)
@@ -72,6 +74,7 @@ SOONG_CONFIG_lineageQcomVars_uses_pre_uplink_features_netmgrd := $(TARGET_USES_P
# Set default values
BOOTLOADER_MESSAGE_OFFSET ?= 0
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
TARGET_GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE ?= false
TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE ?= false
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED ?= 1
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED ?= 0