DescriptionUse a spinlock in SkOnce.
SkOnceFlag is now statically initializable on all platforms.
Also adds sk_atomic_cas, used to implement new SkSpinlock.
Going to punt on making SkOnceFlag any smaller (for now, it's 8 bytes). We could conceivably get it down to two bits, one for done and one for a one-bit spinlock (we'd need atomic-& and atomic-| to make that work, but they appear to be available everywhere).
BUG=skia:1929
Committed: http://code.google.com/p/skia/source/detail?r=12968
Patch Set 1 #
Total comments: 2
Patch Set 2 : check we're initialized in debug mode #
Total comments: 7
Patch Set 3 : bungeman #Patch Set 4 : explicitly initialize #
Total comments: 2
Patch Set 5 : comments #
Messages
Total messages: 10 (0 generated)
|