• Francois Doray's avatar
    [blink scheduler] Remove blink::Thread::ThreadId. · 19571c08
    Francois Doray authored
    To support blink::Thread::ThreadId(), a synchronous wait is necessary
    on blink::WorkerThread creation. To make it possible to remove the
    synchronous wait in an upcoming CL, we remove
    blink::Thread::ThreadId() in this CL.
    
    Usage is replaced by other mechanisms:
    
    1. Change the priority of the compositor thread
    After creating the compositor thread, we post a task to it to obtain its
    tid via base::PlatformThread::CurrentId(). We send the obtained tid to
    the browser process so it can set the desired thread priority.
    
    2. Store the tid in WorkerInspectorController
    Since the code runs on the worker thread, we can just invoke
    base::PlatformThread::CurrentId() instead of blink::Thread::ThreadId().
    
    3. Generate an AgentId for testing
    Instead of using the tid of the main thread as a unique identifier,
    we use base::GetCurrentProcId().
    
    Bug: 1080709
    Change-Id: If92718a2e28b1d9e8ab9f259c95a5f27aee87e66
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2580005
    Commit-Queue: François Doray <fdoray@chromium.org>
    Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#843041}
    19571c08
renderer_blink_platform_impl.h 11.2 KB