• mtklein's avatar
    Port SkLazyPtr to new SkAtomics.h · e72a80db
    mtklein authored
    No algorithmic changes.  The new APIs let us avoid a few ugly trips through void*,
    and I've made the consume/acquire/release decision explicitly conditioned on TSAN.
    
    This should fix the attached bug, which is TSAN seeing us implementing the
    sk_consume_load() with a relaxed load, where we used to pass __ATOMIC_CONSUME
    to TSAN.  This restores us to the status quo of a couple weeks ago, where we
    use relaxed loads (to avoid an extra dmb on ARM) for all setups except TSAN,
    who gets the logically correct memory order, consume.
    
    No public API changes.
    TBR=reed@google.com
    
    BUG=chromium:455606
    
    Review URL: https://codereview.chromium.org/908943002
    e72a80db
SkLazyPtr.h 6.59 KB