Turn on hole punch for PIP with caching
Bug: 188932134
Test: manual
Make the feature default to enabled if the sysprop has not been set.
Note that the feature requires layer caching to be enabled in order to
have any effect.
Change-Id: Ie5ad4188fdc521b5966ad0d0fd0253954fd49e26
diff --git a/services/surfaceflinger/CompositionEngine/src/planner/Planner.cpp b/services/surfaceflinger/CompositionEngine/src/planner/Planner.cpp
index 2f2cc06..297c0b2 100644
--- a/services/surfaceflinger/CompositionEngine/src/planner/Planner.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/planner/Planner.cpp
@@ -30,10 +30,11 @@
namespace android::compositionengine::impl::planner {
Planner::Planner()
- : mFlattener(base::GetBoolProperty(std::string("debug.sf.enable_hole_punch_pip"), false)) {
- // Implicitly, layer caching must also be enabled.
- // E.g., setprop debug.sf.enable_layer_caching 1, or
- // adb shell service call SurfaceFlinger 1040 i32 1 [i64 <display ID>]
+ // Implicitly, layer caching must also be enabled for the hole punch or
+ // predictor to have any effect.
+ // E.g., setprop debug.sf.enable_layer_caching 1, or
+ // adb shell service call SurfaceFlinger 1040 i32 1 [i64 <display ID>]
+ : mFlattener(base::GetBoolProperty(std::string("debug.sf.enable_hole_punch_pip"), true)) {
mPredictorEnabled =
base::GetBoolProperty(std::string("debug.sf.enable_planner_prediction"), false);
}