From 3fb3632d43a002a0958e585ccd7e7847b9ac350b Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Fri, 23 Jul 2021 09:53:55 -0700 Subject: [PATCH] Wallpaper: Propagate transform hint from WM to BBQ surface This allows the buffer producer to consume the transform hint for the first frame. Bug: 194425759 Test: Rotate static wallpaper and check transform sent to HWC for wallpaper layer Change-Id: I7f688c35ea836f57e3443e03d584fa85e745c6f9 --- core/java/android/service/wallpaper/WallpaperService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index fe1fcfc489c1e..7a61511dfb4ef 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -1033,6 +1033,9 @@ public abstract class WallpaperService extends Service { .build(); updateSurfaceDimming(); } + // Propagate transform hint from WM so we can use the right hint for the + // first frame. + mBbqSurfaceControl.setTransformHint(mSurfaceControl.getTransformHint()); Surface blastSurface = getOrCreateBLASTSurface(mSurfaceSize.x, mSurfaceSize.y, mFormat); // If blastSurface == null that means it hasn't changed since the last