skia2/include/effects
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
..
Sk1DPathEffect.h Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )" 2016-03-18 11:22:57 -07:00
Sk2DPathEffect.h Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )" 2016-03-18 11:22:57 -07:00
SkAlphaThresholdFilter.h Split AlphaThresholdEffect out into its own file 2016-04-18 07:20:05 -07:00
SkArcToPathEffect.h Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )" 2016-03-18 11:22:57 -07:00
SkArithmeticMode.h switch xfermodes over to sk_sp 2016-03-29 11:32:50 -07:00
SkBlurDrawLooper.h switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SkBlurImageFilter.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkBlurMaskFilter.h switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SkColorCubeFilter.h Modernize and trim down SkOnce. 2016-04-18 08:09:11 -07:00
SkColorFilterImageFilter.h Revert conversion of SkColorFilterImageFilter to new API 2016-04-07 08:10:45 -07:00
SkColorMatrix.h Revert "Revert of impl colormatrix w/ floats (patchset #7 id:120001 of https://codereview.chromium.org/967943002/)" 2015-03-24 04:13:45 -07:00
SkColorMatrixFilter.h Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #1 id:1 of https://codereview.chromium.org/1821103004/ ) 2016-03-22 10:17:23 -07:00
SkComposeImageFilter.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkCornerPathEffect.h Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )" 2016-03-18 11:22:57 -07:00
SkDashPathEffect.h Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )" 2016-03-18 11:22:57 -07:00
SkDiscretePathEffect.h Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )" 2016-03-18 11:22:57 -07:00
SkDisplacementMapEffect.h Update DisplacementMapEffect to sk_sp 2016-04-15 07:17:36 -07:00
SkDropShadowImageFilter.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkEmbossMaskFilter.h switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
SkGradientShader.h use Make instead of Create to return a shared shader 2016-03-08 18:50:00 -08:00
SkImageSource.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkLayerDrawLooper.h change flattenable factory to return sk_sp 2016-04-03 09:11:13 -07:00
SkLayerRasterizer.h guard rasterizer and drawlooper setters 2016-03-21 13:25:16 -07:00
SkLightingImageFilter.h Fix roll bot's win gn build 2016-04-10 14:04:19 -07:00
SkLumaColorFilter.h Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #1 id:1 of https://codereview.chromium.org/1821103004/ ) 2016-03-22 10:17:23 -07:00
SkMagnifierImageFilter.h Switch SkMagnifierImageFilter over to new onFilterImage interface 2016-04-14 07:54:04 -07:00
SkMatrixConvolutionImageFilter.h Switch SkMatrixConvolutionImageFilter over to new onFilterImage interface 2016-04-13 04:54:36 -07:00
SkMergeImageFilter.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkMorphologyImageFilter.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkOffsetImageFilter.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkPaintFlagsDrawFilter.h C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} 2015-03-25 18:17:32 -07:00
SkPaintImageFilter.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkPerlinNoiseShader.h move setshader to sk_sp, re-using SK_SUPPORT_LEGACY_CREATESHADER_PTR 2016-03-25 09:08:00 -07:00
SkPictureImageFilter.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkTableColorFilter.h Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #1 id:1 of https://codereview.chromium.org/1821103004/ ) 2016-03-22 10:17:23 -07:00
SkTableMaskFilter.h Revert "Revert of factories should return baseclass, allowing the impl to specialize (patchset #4 id:60001 of https://codereview.chromium.org/1390523005/ )" 2015-10-06 14:05:32 -07:00
SkTestImageFilters.h Outline SkImageFilter Make methods 2016-04-17 14:27:05 -07:00
SkTileImageFilter.h Update TileImageFilter to sk_sp 2016-04-15 07:57:40 -07:00
SkXfermodeImageFilter.h Switch SkXfermodeImagerFilter over to new onFilterImage interface 2016-04-15 12:47:42 -07:00