From 71af449630995351bc24b316ea417061e4ad9bf2 Mon Sep 17 00:00:00 2001 From: Peiyong Lin Date: Tue, 31 Oct 2023 23:43:54 +0000 Subject: [PATCH] Make ANGLE part of Android OS system image. As ANGLE will become the default GLES drivers and by shipped by Google, this patch allows ANGLE to be built into Android OS image. Bug: b/293503000 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default Change-Id: I72aa4e126916419d2350a4ce980bd33cb4537c73 --- target/product/angle_default.mk | 4 ++-- target/product/angle_supported.mk | 2 ++ target/product/base_system.mk | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/target/product/angle_default.mk b/target/product/angle_default.mk index bea0be6d53..fdfc7f5795 100644 --- a/target/product/angle_default.mk +++ b/target/product/angle_default.mk @@ -15,9 +15,9 @@ # # To enable ANGLE as the default system GLES drivers, add -# $(call inherit-product, $(SRC_TARGET_DIR)/product/angle_enabled.mk) to the Makefile. +# $(call inherit-product, $(SRC_TARGET_DIR)/product/angle_default.mk) to the Makefile. $(call inherit-product, $(SRC_TARGET_DIR)/product/angle_supported.mk) -PRODUCT_VENDOR_PROPERTIES += \ +PRODUCT_SYSTEM_PROPERTIES += \ persist.graphics.egl=angle diff --git a/target/product/angle_supported.mk b/target/product/angle_supported.mk index c83ff5fcb2..59e6ea3500 100644 --- a/target/product/angle_supported.mk +++ b/target/product/angle_supported.mk @@ -18,6 +18,7 @@ # $(call inherit-product, $(SRC_TARGET_DIR)/product/angle_supported.mk) to the Makefile. # By default, this will allow ANGLE binaries to coexist with native GLES drivers. +ifneq ($(RELEASE_ANGLE_ON_SYSTEM),true) PRODUCT_PACKAGES += \ libEGL_angle \ libGLESv1_CM_angle \ @@ -25,3 +26,4 @@ PRODUCT_PACKAGES += \ # Set ro.gfx.angle.supported based on if ANGLE is installed in vendor partition PRODUCT_VENDOR_PROPERTIES += ro.gfx.angle.supported=true +endif diff --git a/target/product/base_system.mk b/target/product/base_system.mk index eac3026c41..fd4318f99e 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk @@ -346,6 +346,15 @@ ifeq (,$(DISABLE_WALLPAPER_BACKUP)) WallpaperBackup endif +# Moving angle from vendor to system +ifeq ($(RELEASE_ANGLE_ON_SYSTEM),true) +PRODUCT_PACKAGES += \ + libEGL_angle \ + libGLESv1_CM_angle \ + libGLESv2_angle +$(call soong_config_set,angle,angle_on_system,true) +endif + # For testing purposes ifeq ($(FORCE_AUDIO_SILENT), true) PRODUCT_SYSTEM_PROPERTIES += ro.audio.silent=1