Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 56f5b98

Browse files
committed
Catch another function call to mess with EXPENSIVE_RENDERING
1 parent bfcf540 commit 56f5b98

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

patches/personal/platform_frameworks_native/0001-Allow-EXPENSIVE_RENDERING-power-mode-to-be-disabled.patch

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Date: Sun, 1 Jun 2025 21:05:59 +0100
44
Subject: [PATCH 1/1] Allow EXPENSIVE_RENDERING power mode to be disabled
55

66
---
7-
services/surfaceflinger/PowerAdvisor/PowerAdvisor.cpp | 7 +++++++
8-
1 file changed, 7 insertions(+)
7+
services/surfaceflinger/PowerAdvisor/PowerAdvisor.cpp | 10 ++++++++++
8+
1 file changed, 10 insertions(+)
99

1010
diff --git a/services/surfaceflinger/PowerAdvisor/PowerAdvisor.cpp b/services/surfaceflinger/PowerAdvisor/PowerAdvisor.cpp
11-
index c7d0b2c..f811539 100644
11+
index c7d0b2c..1c96c89 100644
1212
--- a/services/surfaceflinger/PowerAdvisor/PowerAdvisor.cpp
1313
+++ b/services/surfaceflinger/PowerAdvisor/PowerAdvisor.cpp
1414
@@ -70,6 +70,13 @@ void traceExpensiveRendering(bool enabled) {
@@ -25,5 +25,15 @@ index c7d0b2c..f811539 100644
2525
if (timeout > 0ms) {
2626
mScreenUpdateTimer.emplace("UpdateImminentTimer", timeout,
2727
/* resetCallback */ nullptr,
28-
--
28+
@@ -110,6 +117,9 @@ void PowerAdvisor::setExpensiveRenderingExpected(DisplayId displayId, bool expec
29+
if (!mHasExpensiveRendering) {
30+
ALOGV("Skipped sending EXPENSIVE_RENDERING because HAL doesn't support it");
31+
return;
32+
+ } else if (android::base::GetBoolProperty("persist.sys.phh.disable_expensive_rendering_mode", false)) {
33+
+ ALOGV("Skipped sending EXPENSIVE_RENDERING because property disables it");
34+
+ return;
35+
}
36+
if (expected) {
37+
mExpensiveDisplays.insert(displayId);
38+
--
2939
2.49.0

0 commit comments

Comments
 (0)