• Bo Liu's avatar
    aw: Remove synchronous draw to ensure GL binding init · 0cd016da
    Bo Liu authored
    Previously, BrowserViewRenderer made sure to use synchronous draws until
    it receives a non-empty frame from the compositor, before it starts
    using async draws. This is to ensure that GL bindings are initialized by
    the compositor before calling into draw functor.
    
    GL init has been made thread safe now. See gpu::InitializeGLThreadSafe.
    
    However, we may have accidentally come to depend on sending a
    synchronous IPC on init before start using async IPCs (which may have
    more places to be dropped randomly than sync IPCs). So out of an
    abudance of caution, change the behavior to send a single synchronous
    IPC (without waiting for non-empty frame).
    
    Note this does have the side effect that we may send empty or null
    frames to render thread, so draw functor may be called before receiving
    first non-null/non-empty CompositorFrame.
    
    One step closer to getting rid of synchronous hardware draw altogether.
    
    Change-Id: I30167e74df7bb0f2a880401f0545148e160fe001
    Reviewed-on: https://chromium-review.googlesource.com/941544Reviewed-by: default avatarTobias Sargeant <tobiasjs@chromium.org>
    Commit-Queue: Bo <boliu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#541507}
    0cd016da
browser_view_renderer.h 8.84 KB