Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c59eff48 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Specify the wallpaper blast wrapper is a wallpaper window

SurfaceFlinger scheduler keys off the window type to implement some
refresh rate selection logic. If a layer has window type wallpaper, then
the refresh rate vote is set to min. With Blast, the actual buffer will
arrive in a layer without the window type metadata. Fix this by
setting the metadata on the blast bbq layer as well.

Test: check if wallpaper runs at a lower refresh rate
Fixes: 191222072
Change-Id: I50058cf42fca155630354ea247d12511ebfe37a8
parent 31bb5762
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.graphics.Matrix.MSCALE_X;
import static android.graphics.Matrix.MSCALE_Y;
import static android.graphics.Matrix.MSKEW_X;
import static android.graphics.Matrix.MSKEW_Y;
import static android.view.SurfaceControl.METADATA_WINDOW_TYPE;
import static android.view.View.SYSTEM_UI_FLAG_VISIBLE;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;

@@ -1024,6 +1025,8 @@ public abstract class WallpaperService extends Service {
                            mBbqSurfaceControl = new SurfaceControl.Builder()
                                    .setName("Wallpaper BBQ wrapper")
                                    .setHidden(false)
                                    // TODO(b/192291754)
                                    .setMetadata(METADATA_WINDOW_TYPE, TYPE_WALLPAPER)
                                    .setBLASTLayer()
                                    .setParent(mSurfaceControl)
                                    .setCallsite("Wallpaper#relayout")