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

Commit 22629d45 authored by Marzia Favaro's avatar Marzia Favaro
Browse files

Make the wallpaper offset update asynchronous

This change tests the effects of making updateWallpaperOffset asynchronous

Bug: 293248754
Test: WallpaperControllerTests
Change-Id: I5a72a1e9a38a7aa9d636c1f2b3b229b13d046151
parent bf4caf3b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -28,3 +28,12 @@ flag {
  description: "Enable accurate transition readiness tracking"
  bug: "294925498"
}


flag {
    name: "wallpaper_offset_async"
    namespace: "windowing_frontend"
    description: "Do not synchronise the wallpaper offset"
    bug: "293248754"
    is_fixed_read_only: true
}
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -536,7 +536,7 @@ class WallpaperController {
            window.mWallpaperY = y;
            window.mWallpaperXStep = xStep;
            window.mWallpaperYStep = yStep;
            updateWallpaperOffsetLocked(window, true);
            updateWallpaperOffsetLocked(window, !mService.mFlags.mWallpaperOffsetAsync);
        }
    }

@@ -561,7 +561,7 @@ class WallpaperController {
        if (window.mWallpaperDisplayOffsetX != x || window.mWallpaperDisplayOffsetY != y)  {
            window.mWallpaperDisplayOffsetX = x;
            window.mWallpaperDisplayOffsetY = y;
            updateWallpaperOffsetLocked(window, true);
            updateWallpaperOffsetLocked(window, !mService.mFlags.mWallpaperOffsetAsync);
        }
    }

+2 −1
Original line number Diff line number Diff line
@@ -117,7 +117,8 @@ class WallpaperWindowToken extends WindowToken {
        final WallpaperController wallpaperController = mDisplayContent.mWallpaperController;
        for (int wallpaperNdx = mChildren.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) {
            final WindowState wallpaper = mChildren.get(wallpaperNdx);
            if (wallpaperController.updateWallpaperOffset(wallpaper, sync)) {
            if (wallpaperController.updateWallpaperOffset(wallpaper,
                    sync && !mWmService.mFlags.mWallpaperOffsetAsync)) {
                // We only want to be synchronous with one wallpaper.
                sync = false;
            }
+2 −0
Original line number Diff line number Diff line
@@ -47,5 +47,7 @@ class WindowManagerFlags {

    final boolean mWindowStateResizeItemFlag = Flags.windowStateResizeItemFlag();

    final boolean mWallpaperOffsetAsync = Flags.wallpaperOffsetAsync();

    /* End Available Flags */
}