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

Commit 613cce81 authored by Riley Andrews's avatar Riley Andrews Committed by Android Git Automerger
Browse files

am 35f97c07: am 5ac56502: Make recents use immutable ashmem bitmaps for things...

am 35f97c07: am 5ac56502: Make recents use immutable ashmem bitmaps for things it frequently passes across binder.

* commit '35f97c07':
  Make recents use immutable ashmem bitmaps for things it frequently passes across binder.
parents 547efb07 35f97c07
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -621,10 +621,11 @@ public class Recents extends SystemUI
                mHeaderBar.draw(c);
                mHeaderBar.draw(c);
                c.setBitmap(null);
                c.setBitmap(null);
            }
            }
            Bitmap thumbnailImmutable = thumbnail.createAshmemBitmap();


            mStartAnimationTriggered = false;
            mStartAnimationTriggered = false;
            return ActivityOptions.makeThumbnailAspectScaleDownAnimation(mDummyStackView,
            return ActivityOptions.makeThumbnailAspectScaleDownAnimation(mDummyStackView,
                    thumbnail, toTaskRect.left, toTaskRect.top, toTaskRect.width(),
                    thumbnailImmutable, toTaskRect.left, toTaskRect.top, toTaskRect.width(),
                    toTaskRect.height(), mHandler, this);
                    toTaskRect.height(), mHandler, this);
        }
        }


+2 −1
Original line number Original line Diff line number Diff line
@@ -490,6 +490,7 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
                // Notify the system to skip the thumbnail layer by using an ALPHA_8 bitmap
                // Notify the system to skip the thumbnail layer by using an ALPHA_8 bitmap
                b = Bitmap.createBitmap(1, 1, Bitmap.Config.ALPHA_8);
                b = Bitmap.createBitmap(1, 1, Bitmap.Config.ALPHA_8);
            }
            }
            Bitmap bImmut = b.createAshmemBitmap();
            ActivityOptions.OnAnimationStartedListener animStartedListener = null;
            ActivityOptions.OnAnimationStartedListener animStartedListener = null;
            if (lockToTask) {
            if (lockToTask) {
                animStartedListener = new ActivityOptions.OnAnimationStartedListener() {
                animStartedListener = new ActivityOptions.OnAnimationStartedListener() {
@@ -515,7 +516,7 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
                        sourceView.getHandler(), animStartedListener);
                        sourceView.getHandler(), animStartedListener);
            } else {
            } else {
                opts = ActivityOptions.makeThumbnailAspectScaleUpAnimation(sourceView,
                opts = ActivityOptions.makeThumbnailAspectScaleUpAnimation(sourceView,
                        b, offsetX, offsetY, transform.rect.width(), transform.rect.height(),
                        bImmut, offsetX, offsetY, transform.rect.width(), transform.rect.height(),
                        sourceView.getHandler(), animStartedListener);
                        sourceView.getHandler(), animStartedListener);
            }
            }
        }
        }