Files
Lawnchair/quickstep
Jordan Silva eefc673796 Skips same drawable for app chip to improve performance
`IconView` creates a new drawable and makes it mutate for scaling it during some animations. The `setDrawable` function there also performs more logic and invalidate the view. Thus, every time `setDrawable` is called in the `IconAppChipView`, even if the same drawable is provided, it will unnecessarily create a copy of the drawable, invalidate and redraw the whole view.

To prevent this inefficient behavior, a hash check has been introduced in `IconAppChipView`. This hash check skips the redundant logic if the same drawable is provided to `setDrawable`.

Bug: 402613435
Flag: com.android.launcher3.enable_overview_icon_menu
Test: OverviewImageTest
Test: OverviewSplitTaskImageTest
Change-Id: I3d20fa6bfc7aaf79222469ad88080985d4c1d1a0
2025-03-28 09:14:39 -07:00
..