skia2/include/ports
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
..
SkFontConfigInterface.h Remove SK_VERY_LEGACY_CREATE_TYPEFACE. 2016-04-13 05:23:35 -07:00
SkFontMgr_android.h Add support for caching font files in the Android SkFontMgr. 2016-02-12 12:42:49 -08:00
SkFontMgr_custom.h Make FreeType usable on Windows. 2016-03-21 06:55:52 -07:00
SkFontMgr_fontconfig.h Move FontConfig factory into separate file. 2015-06-17 07:56:00 -07:00
SkFontMgr_indirect.h Modernize and trim down SkOnce. 2016-04-18 08:09:11 -07:00
SkFontMgr.h Remove SK_VERY_LEGACY_CREATE_TYPEFACE. 2016-04-13 05:23:35 -07:00
SkRemotableFontMgr.h Move SkTemplates.h to private. 2015-08-19 11:56:48 -07:00
SkTypeface_mac.h CMake, include/: changes to make fiddle 2.0 better 2015-12-01 09:02:49 -08:00
SkTypeface_win.h Add option to specify font fallback when creating the skia font manager 2016-04-15 08:20:46 -07:00