Skip unnecessary measurements when possible
This change introduces a new measure cache to View, to remember the measured dimensions for previous pairs of measure specs. The measure cache is cleared whenever a View requests layout. Unfortunately some Views rely on measure being always called when layout is invoked. To work around this problem, we need to remember when we hit the measure cache to force a call to measure just prior to calling onLayout(). This does not completely removes all measure calls but enough to optimize a number of layouts. Change-Id: Ie085fbcf186e9d7505e1127e0786a12968ebc344
Loading
Please register or sign in to comment