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

Commit 57f53c40 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Release all surfaces of transition on finish" into main

parents 47a30308 e4b45a5a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19,10 +19,10 @@ flag {
}

flag {
  name: "release_surface_on_transition_finish"
  name: "release_all_transition_surfaces"
  namespace: "windowing_frontend"
  description: "Reduce offscreen layers which rely on GC to release"
  bug: "407719374"
  bug: "429548260"
  is_fixed_read_only: true
  metadata {
    purpose: PURPOSE_BUGFIX
+2 −1
Original line number Diff line number Diff line
@@ -1429,7 +1429,8 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler,
            // that transaction will be applied on top of those of the merged transitions
            mFinishTransaction = finishT;
            boolean passTransitionInfo = ENABLE_DESKTOP_RECENTS_TRANSITIONS_CORNERS_BUGFIX.isTrue();
            if (!passTransitionInfo) {
            if (!passTransitionInfo
                    && !com.android.window.flags.Flags.releaseAllTransitionSurfaces()) {
                // not using the incoming anim-only surfaces
                info.releaseAnimSurfaces();
            }
+1 −1
Original line number Diff line number Diff line
@@ -371,7 +371,7 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
                mInteractionJankMonitor.end(CUJ_DEFAULT_TASK_TO_TASK_ANIMATION);
            }
            mAnimations.remove(transition);
            if (Flags.releaseSurfaceOnTransitionFinish()) {
            if (!Flags.releaseAllTransitionSurfaces()) {
                info.releaseAllSurfaces();
            }
            finishCallback.onTransitionFinished(null /* wct */);
+4 −0
Original line number Diff line number Diff line
@@ -1133,6 +1133,10 @@ public class Transitions implements RemoteCallable<Transitions>,
     */
    private void releaseSurfaces(@Nullable TransitionInfo info) {
        if (info == null) return;
        if (com.android.window.flags.Flags.releaseAllTransitionSurfaces()) {
            info.releaseAllSurfaces();
            return;
        }
        info.releaseAnimSurfaces();
    }