• Klaus Weidner's avatar
    Refactor AR frame transport and MailboxToSurfaceBridge use · f6d88501
    Klaus Weidner authored
    Instead of partially initializing this in arcore_device, just pass the initial
    object and let the GL thread take care of setting it up.
    
    This also makes it possible to simplify mailbox_to_surface_bridge, it can now
    assume that all post-creation methods are used on a single GL thread.
    
    Add logic to enforce that at most one frame is allowed to be in "processing"
    state, deferring the next frame in case of attempted overlap. This matches
    the current logic used in GVR's immersive-vr mode.
    
    Also update some stale comments and make simplifications that are now possible
    due to the new lifecycle.
    
    Bug: 1012972, 836524
    Change-Id: I9b85bb6dd261c0c2fa41f443222e34b76a64c5c1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1854506
    Commit-Queue: Klaus Weidner <klausw@chromium.org>
    Reviewed-by: default avatarPiotr Bialecki <bialpio@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#705317}
    f6d88501
mailbox_to_surface_bridge.h 5.21 KB