Update frame rate category changing logic
This CL is created to avoid the unnecessary (frequent) frame rate category update. One observed scenario is that when a Video and an animation have different invalidation intervals and sizes, it can cause the frameRateCategory to be updated repeatedly. To resolve this issue, we introudce counters for different category. Everytime a category is voted, the value of the counter is set to 5 and this value will be decrease by 1 every frame. When the value of a counter is greater than 0, it will be taken into consideration when determining the category to be set. If the ViewRootImpl doesn't receive a vote of a category in 5 frames, the category won't be taken into consideration anymore. Test: atest ViewRootImplTest Change-Id: I71e1f95381bc696865c50c2dc41a03f1646f5924
Loading
Please register or sign in to comment