Skip to content

Commit

Permalink
Hookup GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bgcngm authored and bheatleyyy committed Jul 28, 2023
1 parent c1071f8 commit c842cd7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build/soong/Android.bp
Expand Up @@ -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: "customGlobalVars",
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",
Expand Down
3 changes: 3 additions & 0 deletions config/BoardConfigSoong.mk
Expand Up @@ -31,6 +31,7 @@ SOONG_CONFIG_customGlobalVars += \
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_init_vendor_lib \
target_ld_shim_libs \
Expand All @@ -55,6 +56,7 @@ SOONG_CONFIG_customQcomVars += \
endif

# Soong bool variables
SOONG_CONFIG_customGlobalVars_gralloc_handle_has_custom_content_md_reserved_size := $(TARGET_GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE)
SOONG_CONFIG_customGlobalVars_gralloc_handle_has_reserved_size := $(TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE)
SOONG_CONFIG_customGlobalVars_uses_egl_display_array := $(TARGET_USES_EGL_DISPLAY_ARRAY)
SOONG_CONFIG_customGlobalVars_uses_oplus_camera := $(TARGET_USES_OPLUS_CAMERA)
Expand All @@ -66,6 +68,7 @@ SOONG_CONFIG_customQcomVars_uses_pre_uplink_features_netmgrd := $(TARGET_USES_PR
# 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_INIT_VENDOR_LIB ?= vendor_init
TARGET_SURFACEFLINGER_UDFPS_LIB ?= surfaceflinger_udfps_lib
Expand Down

0 comments on commit c842cd7

Please sign in to comment.