• ckitagawa's avatar
    Reland "[Paint Preview] Pre-warm compositor" · 989a76e6
    ckitagawa authored
    This is a reland of 3480cbb1
    
    I had to revert the original due to small time regressions in time to
    navigation commit time and a larger regression in memory.
    
    I've deferred the initialization of the warm compositor to after we know
    we likely have something to show to avoid this regression as much as
    possible. This improves things by O(10 ms) still, but is not as
    significant of an improvement as before.
    
    Original change's description:
    > [Paint Preview] Pre-warm compositor
    >
    > This CL adds the ability to pre-warm a compositor process for use by
    > paint preview show-on-startup.
    >
    > 1. The compositor is started when native is initialized if the
    >    experiment is enabled.
    > 2. Depending on the situation the compositor is then used or killed.
    >    a. Compositor is used: disconnect handler is updated and it is used
    >       as if there was a compositor already.
    >    b. Compositor is not used: the process is killed immediately.
    >
    > This moves initialization of the compositor service up to O(100 ms)
    > earlier (in local tests).
    >
    > Bug: 1126180
    > Change-Id: I1e6f627403e8c020b6551c510ad908bba0fc24a2
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2398562
    > Reviewed-by: Mehran Mahmoudi <mahmoudi@chromium.org>
    > Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#805317}
    
    Bug: 1126180
    Change-Id: I7f7764bb080622b990dfadb7a99957cc9d992668
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2403580Reviewed-by: default avatarMehran Mahmoudi <mahmoudi@chromium.org>
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#806675}
    989a76e6
warm_compositor.cc 1.53 KB