diff options
author | 2025-02-19 16:03:41 -0800 | |
---|---|---|
committer | 2025-02-19 16:03:41 -0800 | |
commit | 50098249722276f23cdf810459a158ad7b31a52c (patch) | |
tree | d6c7176c4fdf3fc3d7e9ddb61452039d65b11da7 | |
parent | 15769b521e087f69b1310c5b08baca27ea553338 (diff) | |
parent | 8bba22be40afdb7f7fcfd5a663be6fc0856c899e (diff) |
Merge "GraphicsEnv: Get feature overrides from GpuService" into main
-rw-r--r-- | libs/graphicsenv/GraphicsEnv.cpp | 20 | ||||
-rw-r--r-- | libs/graphicsenv/include/graphicsenv/GraphicsEnv.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp index 4bc261106a..626581cc2a 100644 --- a/libs/graphicsenv/GraphicsEnv.cpp +++ b/libs/graphicsenv/GraphicsEnv.cpp @@ -621,6 +621,10 @@ void GraphicsEnv::setAngleInfo(const std::string& path, const bool shouldUseNati mShouldUseAngle = true; } mShouldUseNativeDriver = shouldUseNativeDriver; + + if (mShouldUseAngle) { + updateAngleFeatureOverrides(); + } } std::string& GraphicsEnv::getPackageName() { @@ -632,6 +636,22 @@ const std::vector<std::string>& GraphicsEnv::getAngleEglFeatures() { return mAngleEglFeatures; } +// List of ANGLE features to override (enabled or disable). +// The list of overrides is loaded and parsed by GpuService. +void GraphicsEnv::updateAngleFeatureOverrides() { + if (!graphicsenv_flags::feature_overrides()) { + return; + } + + const sp<IGpuService> gpuService = getGpuService(); + if (!gpuService) { + ALOGE("No GPU service"); + return; + } + + mFeatureOverrides = gpuService->getFeatureOverrides(); +} + void GraphicsEnv::getAngleFeatureOverrides(std::vector<const char*>& enabled, std::vector<const char*>& disabled) { if (!graphicsenv_flags::feature_overrides()) { diff --git a/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h b/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h index 55fa13abb5..68219008e8 100644 --- a/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +++ b/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h @@ -121,6 +121,7 @@ public: // Get the app package name. std::string& getPackageName(); const std::vector<std::string>& getAngleEglFeatures(); + void updateAngleFeatureOverrides(); void getAngleFeatureOverrides(std::vector<const char*>& enabled, std::vector<const char*>& disabled); // Set the persist.graphics.egl system property value. |