summaryrefslogtreecommitdiff
path: root/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
AgeCommit message (Collapse)Author
2022-01-13Directly assign mDepthLucas Dupin
A request to set a new depth is ignored if the surface is currently invalid. We should cache what was the requested value, so it will be applied once the surface is valid again. Test: manual Fixes: 209028986 Change-Id: I812816da4b0139c7ea7b53a9fb00f11265ecdea8
2021-11-23Prevent setting launcher layer has opaque when there is content behindWinson Chung
- This can prevent the layered content behind to not be visible (and since launcher draws a cutout and the wallpaper isn't shown, may result in a black rect. We only specialize for this case while Launcher is in Overview. - Also don't need to defer updating drawsBelowRecents, this can result in the state not being reflected since it runs after the last update of the transform params Bug: 205789573 Test: Swipe up from app and ensure behind layers are visible (also ensure this doesn't affect blur during the swipe or optimizations after you leave overview) Change-Id: I07689b3d9b65708797576e5fbefe12fb1f544119
2021-09-10Dump DepthController internalsLucas Dupin
Add DepthController to dumpsys, so it's easier to debug any future issues. Bug: 198732728 Test: adb shell dumpsys activity com.google.android.apps.nexuslauncher Change-Id: Ifa7fe1d7fcb375cacc907d0da9524a2ee2a2677d
2021-08-30Merge "Dispatch blur radius for BACKGROUND_APP state" into sc-v2-devLucas Dupin
2021-08-27Dispatch blur radius for BACKGROUND_APP stateLucas Dupin
When entering BACKGROUND_APP, it's possible that the blur radius will be lost. We need to dispatch it on the first possible frame, otherwise Overview won't have blurs. Fixes: 196828055 Test: enter overview multiple times Test: pull up all apps Test: open app from home or all apps Change-Id: I5920e1b28e2d23421863ecd59845e902040d126c
2021-08-26Don't avoid blurring overviewLucas Dupin
The app window is now on top of the scrims, so we can just mark the window as opaque and keep blurring. Bug: 196828055 Test: atest OutputUpdateAndWriteCompositionStateTest Test: systrace on all app, and overview Change-Id: I128d3b4722060c0bb72a218bf01ba26dabaddacf
2021-08-24Synchronize surface transactionLucas Dupin
Until now the SurfaceControl transaction was being applied asynchronously, which could lead to it being executed out of sync with launcher drawing. This became an issue at higher refresh rates, where frames are produced at a much faster pace. In order to fix this issue, we can use BLAST transactions, which are annotated with a frame number. Test: record video, go through it manually Fixes: 194320152 Change-Id: I1636a1ded4f9dd84c54ba12239e3549b92ed7567
2021-08-13Constrain scroll amountLucas Dupin
Test: scroll vertically and horizontally Fixes: 196309367 Change-Id: Ibf16fb72cf95e29ed820d5f511e764a388c93bb0
2021-08-11Merge "Act on scrim visibility" into sc-v2-devLucas Dupin
2021-08-10Act on scrim visibilityLucas Dupin
The scrim visibility drives whether the launcher window is opaque or not. We should track it and apply the flag instead of trying to catch it through other Launcher life cycles. Fixes: 195365607 Test: tap on home button while launching app from overview Change-Id: I2a00b86b602b5dd12c901433b92adcf0170be15e
2021-07-28Merge "Add depth to -1 screen" into sc-v2-devLucas Dupin
2021-07-28Add depth to -1 screenLucas Dupin
Wallpaper will zoom out as you drag the overlay Test: manually pull overlay Fixes: 192502999 Change-Id: I9067b70d10497d4e16a5ef601161fbedfa9307e1
2021-07-26Request early wake-up when zoomingLucas Dupin
This way we'll be less likely to jank on 120Hz devices. Test: manual Fixes: 194680560 Change-Id: Ieff93f234701649514f8905c20c19cef231c816b
2021-07-20Revert "Apply depth even when surface is null"Lucas Dupin
This reverts commit a6c38be150681f537ef316a56867387309861768. Fixes: 193333562 Test: manual Change-Id: I4fae079e0cd056fc800e5a15389f4795c77e17fb
2021-07-02Use launcher surface when removing launch targetLucas Dupin
Otherwise events won't be dispatched properly and window opacity will be wrong. Test: manual Fixes: 191149025 Change-Id: Ice7ea86252282c7dc1cb5925dd1bdb8cade89c08
2021-06-29Decouple zooms and blurs on app launchLucas Dupin
We'd like to be able to disable blurs during app launch, but without disabling zooms as well. The previous sysprop would set the depth of BackgroundAppState to 0, when what we want is to conserve wallpaper zoom. Bug: 191969790 Test: adb shell setprop ro.launcher.blur.appLaunch false Change-Id: Ie4b26096f6ac723c3981bba2829557e6cc6c733b
2021-06-23Disable blurs when dev setting or battery saverLucas Dupin
Stop rendering blurs whenever a user: - disables blurs on developer settings - enables battery saver Test: manual Bug: 191814337 Change-Id: I8fd04796054d92171732c8db95b64cfa3ec469ec
2021-06-21Apply depth even when surface is nullLucas Dupin
We need to update mDepth even when the surface is null, otherwise events will be ignored and mDepth will have the wrong value when waking up from screen-off. Test: pull up app drawer, screen off, unlock Test: go to overview, screen off, unlock Test: launch app, observe blurs and zoom Fixes: 191153501 Change-Id: I33f5d84a50e24f05a09769b1f7f3c27969f847cd
2021-06-04Remove blur from launcher when in overviewLucas Dupin
The App window will be under Launcher, so we can't actually blur launcher at that time, otherwise the live window will also be blurred. Test: manual Bug: 189207458 Change-Id: Ie07449d29d3b0dc60d3787b6d32aa9e46e0bb613
2021-06-01Set blur on effect layer during app launchLucas Dupin
Test: manual Fixes: 189207458 Change-Id: I8fabba92c6831c2fd54fe08156fc9a9b5d141a56
2021-05-20Make launcher opaque when scrim becomes opaqueLucas Dupin
This will help with overdraw, because we don't need to draw the wallpaper. Test: manual Test: adb shell dumpsys SurfaceFlinger --timestats -dump Bug: 187703092 Change-Id: I2ebae94725578e5f4d640cd6b45da3f4d1f21a20
2021-04-26Remove reliance on surface to update depthJon Miranda
- Also no longer resets depth on surface change, as depth is independent from blur. This fixes the bug where depth is not accurately reflected. Bug: 185680609 Bug: 185189176 Test: launch app and swipe home multiple times launch app and back gesture to home Change-Id: I5e2f4ce08b8bf84b7356fbd080ae732875c5e04e
2021-03-29Remove Overview atomic animation supportTony Wickham
- Remove PLAY_ATOMIC_OVERVIEW_SCALE and PLAY_ATOMIC_OVERVIEW_PEEK - Remove complicated parallel atomic animation support from AbstractStateChangeTouchController and subclasses - Remove some code related to going between Overview <-> AllApps Test: Swipe between states in all 3 navigation modes Bug: 175137718 Change-Id: Ice314d46946c3a983cdc6ccf1a67effb5da9156e
2020-06-19Add depth animation when multiwindow mode changes.Jon Miranda
This is a workaround until we can support app transitions when starting an activity in mw mode. Bug: 158613217 Change-Id: I843d6669722c543728ab532e1c4fbd4643f6f135
2020-06-12Gates blur code behind BlurUtils#supportsBlursOnWindows.Jon Miranda
This "fixes" the bug where wallpaper zoom does not reset to 0 when screen turns off since we no longer require a valid surface to set the depth when blur is disabled. Note that the bug still exists when blur is enabled, which will need to be fixed in a follow up CL. Bug: 157946272 Change-Id: I43179435885c95eb2ecf406fa5c291badf5a1ed3
2020-06-02Merge "Update home to overview depth interpolator to match other motion" ↵TreeHugger Robot
into ub-launcher3-rvc-dev
2020-06-01Update home to overview depth interpolator to match other motionTony Wickham
Overview comes in and workspace goes out at overshoot(1.2), so the wallpaper depth/blur should match that speed. Test: go to overview from home in 3 button or 0 button mode, ensure wallpaper scales down at the same rate as other elements Bug: 154637581 Change-Id: I03254fa3fdf19f468852bed8aab7ba21203c429a
2020-05-29Fix depth jumping around during transitions.Jon Miranda
This is caused because we use mDepth for depth comparisons, but there are cases where we set mDepth but we do not pass that value to WallpaperManager (ie. surface is null or not valid) and that leads us into inconsistent states. Bug: 155780358 Change-Id: I3faf14416d5783ad472892425eb0bd37dd469a46
2020-05-11Abstracting out state handler logic into base classes so that it canSunny Goyal
also be used in different activity Change-Id: Ic5e60b21e1429c71f1cd4e7041e70bf4fc9761b7
2020-04-29Do not blur if all apps is fully visibleLucas Dupin
Fixes: 155093795 Fixes: 155203546 Test: manual Change-Id: I30f4c027e5107a199791e908acbb7ffed94e6a77
2020-04-17Dedupe non-perceptable depth updatesWinson Chung
Bug: 154304487 Change-Id: I6d96aca555932f4a51aed576d25f7150952bb562
2020-04-15Add AnimationFlag for SKIP_DEPTH_CONTROLLER.Jon Miranda
We use this flag to prevent the depth from being immediately set to 0 when preparing to animate home. Bug: 152327671 Change-Id: I614c6ae08b9f9e56ecb94fb51748791a38504583
2020-03-24Removing base no-op implementation of depth controllerSunny Goyal
Change-Id: Ibf46c0a147d2772033ad469b803e606376978cd7