Revert "Revert "SurfaceFlinger: add a sysprop for GL backpressure""
This reverts commit cc1ce6476e4deb8877c10b2a59afd27556ec72e9.
Reason for revert: This change is needed to fix b/138083790. The underlying issue causing the first revert is now resolved.
Change-Id: I82eeec5f5e66570e03f37294d7bbe15c41fec86e
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 2d31910..6166789 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -353,6 +353,11 @@
mPropagateBackpressure = !atoi(value);
ALOGI_IF(!mPropagateBackpressure, "Disabling backpressure propagation");
+ property_get("debug.sf.enable_gl_backpressure", value, "0");
+ mPropagateBackpressureClientComposition = atoi(value);
+ ALOGI_IF(mPropagateBackpressureClientComposition,
+ "Enabling backpressure propagation for Client Composition");
+
property_get("debug.sf.enable_hwc_vds", value, "0");
mUseHwcVirtualDisplays = atoi(value);
ALOGI_IF(mUseHwcVirtualDisplays, "Enabling HWC virtual displays");
@@ -1670,9 +1675,9 @@
break;
}
- // For now, only propagate backpressure when missing a hwc frame.
- if (hwcFrameMissed && !gpuFrameMissed) {
- if (mPropagateBackpressure) {
+ if (frameMissed && mPropagateBackpressure) {
+ if ((hwcFrameMissed && !gpuFrameMissed) ||
+ mPropagateBackpressureClientComposition) {
signalLayerUpdate();
break;
}