• Sami Kyostila's avatar
    Adjust logic for UI thread priority · 805ae757
    Sami Kyostila authored
    This patch adjusts the logic for UI thread priority:
    
    1) The priority is only increased to DISPLAY unless it was lower to
       begin with. Recent versions of Android (O+) automatically set the top
       activity's UI thread's niceness to TOP_APP_PRIORITY_BOOST (-10), so
       by setting the priority to DISPLAY (-4) we were in fact lowering the
       priority.
    
    2) The priority is increased earlier in the start-up flow to minimize
       the chances of descheduling.
    
    We also add a field trial for the first change to evaluate its impact.
    
    BUG=841804
    TEST=Manual inspection
    
    Change-Id: I3ec70042be86f2b88bb1ae3a2dd8cba7d87eb807
    Reviewed-on: https://chromium-review.googlesource.com/1136648
    Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
    Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
    Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
    Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#576079}
    805ae757
content_features.h 9.6 KB