skia2/include/private
mtklein 15923c9e47 Modernize SkSpinlock.
- Use std::atomic directly.
 - No more need for SkPODSpinlock or SK_DECLARE_STATIC_SPINLOCK.

Now simple code like this works as you'd hope:
    static SkSpinlock gLock;

That is, it starts unlocked and there's no static initializer.

std::atomic_flag would make this terser and standard-guaranteed,
but ATOMIC_FLAG_INIT caused not-yet-implemented errors on MSVC 2013.
The generated code for this approach is identical.

It appears the implicit constructor is constexpr when all the member
initializers are.  I'm hoping this way of producing constexpr constructors
without typing "constexpr" gives us a way to eliminate more SkFoo / SkBaseFoo
distinctions and SK_DECLARE_STATIC_FOO.  This was certainly the easiest.

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

Review URL: https://codereview.chromium.org/1734383002
2016-02-29 10:14:38 -08:00
..
GrAuditTrail.h Add abilitly to query audit trail for batches by draw op 2016-02-29 07:44:02 -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 SkAtomic: always use std::atomic 2015-11-12 11:07:53 -08:00
SkChecksum.h Switch uses of SkChecksum::Compute to Murmur3. 2015-11-16 11:16:23 -08:00
SkFloatBits.h fix undefined signed shifts 2016-02-26 05:01:42 -08:00
SkFloatingPoint.h de-proc sk_float_rsqrt 2016-01-26 07:40:30 -08:00
SkGpuFenceSync.h add wait on fence without flush 2016-01-20 10:54:58 -08:00
SkMiniRecorder.h Move the last headers. Cross your fingers. 2015-07-29 13:31:22 -07:00
SkMutex.h Use SkAutoTExclusive guard in DirectWrite port. 2015-10-23 10:48:26 -07:00
SkOnce.h Modernize SkSpinlock. 2016-02-29 10:14:38 -08:00
SkOncePtr.h Revert of skstd -> std for unique_ptr (patchset #24 id:460001 of https://codereview.chromium.org/1436033003/ ) 2016-01-24 19:49:24 -08:00
SkRecords.h Revert[2] of "add backdrop option to SaveLayerRec" 2016-01-07 11:28:08 -08:00
SkSemaphore.h Move SkAtomics.h to private. 2015-09-28 11:24:13 -07:00
SkSpinlock.h Modernize SkSpinlock. 2016-02-29 10:14:38 -08:00
SkTArray.h Move SkTArray to include/private. 2016-02-17 13:13:44 -08:00
SkTDArray.h Move SkTDArray to private. 2016-02-18 08:53:33 -08:00
SkTDict.h move SkTDict and SkTSearch into private 2016-01-03 18:36:05 -08:00
SkTemplates.h Move Google3-specific stack limitation logic to template classes. 2016-02-05 07:02:38 -08: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 Fixed compilation on mingw. 2016-01-25 07:27:36 -08:00
SkTSearch.h move SkTDict and SkTSearch into private 2016-01-03 18:36:05 -08:00
SkUniquePtr.h Work around vs2013sp2-3 bug in skstd::unique_ptr. 2016-01-25 13:00:34 -08:00
SkWeakRefCnt.h Move SkAtomics.h to private. 2015-09-28 11:24:13 -07:00