• Sadrul Habib Chowdhury's avatar
    ozone: Workaround a start up race for OzonePlatform. · faa97473
    Sadrul Habib Chowdhury authored
    With mus, OzonePlatform is created in the mus-ws thread, and it can be
    accessed from the IO thread in GpuProcessHost. There is a race here,
    since the IO thread and the mus-ws thread do not know about each other.
    So, instead of immediately talking to the OzonePlatform instance from
    GpuProcessHost, register a callback that gets run once the instance is
    created and initialized. This way, with regular chrome (where
    OzonePlatform is created on the UI thread), the callback is run
    immediately. But with mus, it waits until the OzonePlatform instance is
    available.
    
    BUG=786453
    
    Change-Id: I9c4553333ef29d5541cf3b65fed475c3cc7ef2db
    Reviewed-on: https://chromium-review.googlesource.com/794103
    Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
    Reviewed-by: default avatarMichael Spang <spang@chromium.org>
    Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#521353}
    faa97473
ozone_platform.cc 3.43 KB