diff options
| author | 2021-04-11 00:16:23 +0000 | |
|---|---|---|
| committer | 2021-04-11 00:16:23 +0000 | |
| commit | 080abd80f4f648f2e45fb4eb1e409bca1b128d4f (patch) | |
| tree | 98cea2c2e704763cdcc44f61e4f94960382d275b /libs/hwui/Properties.cpp | |
| parent | 84f96c845ba75c43d7ad4679065086b79d773175 (diff) | |
| parent | 027b2188473bd48c34cdafad1705abac7fff9356 (diff) | |
Merge changes from topic "android_dynamic_performance_framework" into sc-dev
* changes:
Integrate HWUI with PerformanceHintManager
ADPF: Add HintManagerService
ADPF: PerformanceHintManager API implementation
Diffstat (limited to 'libs/hwui/Properties.cpp')
| -rw-r--r-- | libs/hwui/Properties.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp index e58f31fd15eb..7af0a221d228 100644 --- a/libs/hwui/Properties.cpp +++ b/libs/hwui/Properties.cpp @@ -81,6 +81,9 @@ bool Properties::isolatedProcess = false; int Properties::contextPriority = 0; float Properties::defaultSdrWhitePoint = 200.f; +bool Properties::useHintManager = true; +int Properties::targetCpuTimePercentage = 70; + bool Properties::load() { bool prevDebugLayersUpdates = debugLayersUpdates; bool prevDebugOverdraw = debugOverdraw; @@ -128,6 +131,10 @@ bool Properties::load() { runningInEmulator = base::GetBoolProperty(PROPERTY_IS_EMULATOR, false); + useHintManager = base::GetBoolProperty(PROPERTY_USE_HINT_MANAGER, true); + targetCpuTimePercentage = base::GetIntProperty(PROPERTY_TARGET_CPU_TIME_PERCENTAGE, 70); + if (targetCpuTimePercentage <= 0 || targetCpuTimePercentage > 100) targetCpuTimePercentage = 70; + return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw); } |