• ericrk's avatar
    Throttle GpuWatchdogThread task posting · 6971ec6d
    ericrk authored
    The GpuWatchdogThread currently allows multiple tasks to disarm the
    watchdog to be posted in a row, only stopping posting when the watchdog
    is actually disarmed. This is fairly wasteful, as all but the first
    task will just early out. This change adjusts the logic so that we only
    post one disarm task, at a time, blocking future disarm tasks until
    we have successfully disarmed / rearmed the watchdog.
    
    This change also removes the current "volatile bool", and replaces this with a
    base::subtle::Atomic32, which makes the expectations regarding synchronization
    more explicit.
    
    BUG=612219
    CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
    
    Review-Url: https://codereview.chromium.org/2389633003
    Cr-Commit-Position: refs/heads/master@{#422549}
    6971ec6d
gpu_watchdog_thread.cc 15.7 KB