• Yifei Yu's avatar
    Balance scheduler callbacks for forwarded events. · 473e303d
    Yifei Yu authored
    The scheduler expects balanced callbacks of DidHandleInputEventOnMainThread()
    and DidHandleInputEventOnCompositorThread(EVENT_FORWARDED_TO_MAIN_THREAD).
    If the expectation is broken, the wrongly-maintained UserModel would produce
    an endless loop of UpdatePolicy(), which consumes device power.
    
    Also makes corresponding changes to unit test.
    
    Bug: 837105
    Change-Id: Ib5193041728a97f055df757a33680e788dd4c876
    Reviewed-on: https://chromium-review.googlesource.com/1032468Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
    Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#556077}
    473e303d
main_thread_event_queue.h 6.42 KB