skia2/include/private
mtklein 650f9e9a26 SkOnce: 2 bytes -> 1 byte
This uses the same logic we worked out for SkOncePtr to reduce
the memory footprint of SkOnce from a done byte and lock byte
to a single 3-state byte:

  - NotStarted: no thread has tried to run fn() yet
  - Active:     a thread is running fn()
  - Done:       fn() is complete

Threads which see Done return immediately.
Threads which see NotStarted try to move to Active, run fn(), then move to Done.
Threads which see Active spin until the active thread moves to Done.

This additionally fixes a too-weak memory order bug in SkOncePtr,
and adds a big note to explain.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1904483003

Committed: https://skia.googlesource.com/skia/+/df02d338be8e3c1c50b48a3a9faa582703a39c07

Review URL: https://codereview.chromium.org/1904483003
2016-04-20 13:49:15 -07:00
..
GrAuditTrail.h Fix up GrAuditTrail to allow arbitrary reordering 2016-03-08 10:43:42 -08:00
GrSingleOwner.h Reland of Make a single GrSingleOwner in GrContext (patchset #1 id:1 of https://codereview.chromium.org/1565303003/ ) 2016-01-08 10:09:13 -08:00
SkAtomics.h Convert SkRefCnt to std::atomic. 2016-04-08 06:58:52 -07:00
SkChecksum.h Switch uses of SkChecksum::Compute to Murmur3. 2015-11-16 11:16:23 -08:00
SkFixed.h Revert of For *ToFixed, in debug mode, assert that the value is in range. (patchset #6 id:140001 of https://codereview.chromium.org/1824733002/ ) 2016-04-07 19:27:45 -07:00
SkFloatBits.h fix undefined signed shifts 2016-02-26 05:01:42 -08:00
SkFloatingPoint.h Add SkScalarTruncToScalar and speed up SkScalarFraction. 2016-03-10 13:39:30 -08:00
SkGpuFenceSync.h add wait on fence without flush 2016-01-20 10:54:58 -08:00
SkMiniRecorder.h return pictures as sk_sp 2016-03-18 07:25:55 -07:00
SkMutex.h Use SkAutoTExclusive guard in DirectWrite port. 2015-10-23 10:48:26 -07:00
SkOnce.h SkOnce: 2 bytes -> 1 byte 2016-04-20 13:49:15 -07:00
SkOncePtr.h SkOnce: 2 bytes -> 1 byte 2016-04-20 13:49:15 -07:00
SkRecords.h Move annotations to canvas virtual (patchset #8 id:140001 of https://codereview.chromium.org/1744103002/ )" 2016-03-04 16:36:20 -08:00
SkSemaphore.h Move SkAtomics.h to private. 2015-09-28 11:24:13 -07:00
SkSpinlock.h Make Cmake work with debug build 2016-03-04 08:30:05 -08:00
SkTArray.h SkTArray movable and swap for move only elements. 2016-04-20 10:22:20 -07:00
SkTDArray.h detach -> release 2016-03-16 13:53:35 -07:00
SkTDict.h move SkTDict and SkTSearch into private 2016-01-03 18:36:05 -08:00
SkTemplates.h Remove transitional explicit operator bool. 2016-03-21 09:35:33 -07:00
SkTFitsIn.h Templatize SkToXXX. 2016-03-19 15:06:56 -07:00
SkTHash.h SkTHash: hash from fnptr to functor type 2015-10-15 12:23:02 -07:00
SkThreadID.h Unify ThreadID. 2015-09-29 14:38:01 -07:00
SkTLogic.h Templatize SkToXXX. 2016-03-19 15:06:56 -07:00
SkTSearch.h move SkTDict and SkTSearch into private 2016-01-03 18:36:05 -08:00
SkWeakRefCnt.h Convert SkRefCnt to std::atomic. 2016-04-08 06:58:52 -07:00