skia2/include/private
mtklein d9dd428211 Modernize and trim down SkOnce.
The API and implementation are very much simplified.
You may not want to bother reading the diff.

As is our trend, SkOnce now uses <atomic> directly.

Member initialization means we don't need SK_DECLARE_STATIC_ONCE.
SkSpinlock already works this same way.

All uses of the old API taking an external bool* and Lock* were pessimal,
so I have not carried this sort of API forward.  It's simpler, faster,
and more space-efficient to always use this single SkOnce class interface.

SkOnce weighs 2 bytes: a done bool and an SkSpinlock, also a bool internally.
This API refactoring opens up the opportunity to fuse those into a single
three-state byte if we'd like.

No public API changes.
TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1894893002
2016-04-18 08:09:11 -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 Modernize and trim down SkOnce. 2016-04-18 08:09:11 -07:00
SkOncePtr.h Use std::unique_ptr. 2016-03-16 10:28:35 -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 Add "sample locations" feature to GrProcessor 2016-03-07 13:58:26 -08: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