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

Skip to content
Commit 36579219 authored by Tony Wickham's avatar Tony Wickham
Browse files

Only create one bitmap to clip popup item corners

Previously we created a bitmap the size of the entire popup item and
drew a rounded rect in it to clip the corners. Now we create a bitmap
that is only the size of the rounded corner radius, and rotate and
translate it to all four corners to achieve the same clipping.

Besides the reduced memory of this approach, it also simplifies things
when we reduce the item's height (e.g. when the second to last
notification is dismissed), because we no longer have to recreate the
background bitmap to match the new size; the translation calculations
in dispatchDraw() automatically take the current size into account.

Bug: 35869307
Change-Id: I938bbc4bd87479580287426b4197516caf1a64d4
parent 0aa685bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment