power: Add property check for EXPENSIVE_RENDERING

Detect the support status of EXPENSIVE_RENDERING mode based on the
vendor property, which can be configured per target.

Change-Id: I39ed53f5df506bb8b7a714138d35e5b29bcfa4a5
CRs-Fixed: 3364809
This commit is contained in:
Jun Wang
2022-12-15 15:21:34 +08:00
parent 92e50efac0
commit a76131a3c1
5 changed files with 35 additions and 0 deletions

View File

@@ -96,6 +96,12 @@ ndk::ScopedAStatus Power::isModeSupported(Mode type, bool* _aidl_return) {
switch(type){
case Mode::EXPENSIVE_RENDERING:
if (is_expensive_rendering_supported()) {
*_aidl_return = true;
} else {
*_aidl_return = false;
}
break;
case Mode::INTERACTIVE:
case Mode::SUSTAINED_PERFORMANCE:
case Mode::FIXED_PERFORMANCE: