SurfaceFlinger: handle wallpaper scenario in Scheduler
Use the fact that a layer contains wallpaper in Scheduler's
algorithm when picking a refresh rate. Wallpaper should be presented
in the lowest active refresh rate to preserve power.
Test: systrace during wallpaper
Bug: 124065567
Change-Id: Ibb18e62eaf1a6b9b3ab1ec18a3135fb17c8f57fc
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 66e35b6..f4545e0 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -885,6 +885,9 @@
// Can only be accessed with the SF state lock held.
bool mChildrenChanged{false};
+ // Window types from WindowManager.LayoutParams
+ const int mWindowType;
+
// This is populated if the layer is registered with Scheduler for tracking purposes.
std::unique_ptr<scheduler::LayerHistory::LayerHandle> mSchedulerLayerHandle;