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

Skip to content
Commit 9cefbda1 authored by Adam Powell's avatar Adam Powell
Browse files

View measurement optimization

If a view hasn't explicitly requested layout and it's asked to measure
with MeasureSpec.EXACTLY in both dimensions and sizes that match its
current measured size, the measure operation is a no-op.

This helps out a number of ViewGroups that perform initial speculative
measurements with AT_MOST or UNSPECIFIED followed by looping over
child views and measuring EXACTLY to lock in the final measurement
with perhaps some extra leftover space distributed. In practice this
happens a fair bit, especially for views high up in the view
hierarchy. This optimization allows ViewGroup measurement code to be a
little cleaner in not having to keep track of this on its own.

Change-Id: I88ff46a7d37aeda7a4cd16204b68cab0d051b341
parent 074c5b5b
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