skia2/dm
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
..
DM.cpp Modernize SkSpinlock. 2016-02-29 10:14:38 -08:00
DMGpuSupport.h Move Budgeted enum out of SkSurface, use in GrTextureProvider 2016-02-25 08:33:02 -08:00
DMJsonWriter.cpp Add gamma_correct option field to dm.json 2016-02-29 07:38:01 -08:00
DMJsonWriter.h Add gamma_correct option field to dm.json 2016-02-29 07:38:01 -08:00
DMSrcSink.cpp DM: support --config {f16,srgb} 2016-02-26 14:43:21 -08:00
DMSrcSink.h DM: support --config {f16,srgb} 2016-02-26 14:43:21 -08:00
DMSrcSinkAndroid.cpp Simplify linkages to Android framework internals 2015-10-26 07:21:32 -07:00
DMSrcSinkAndroid.h DM: this must have been missing from the previous CL 2016-02-08 14:30:25 -08:00