Go to file
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
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Move Budgeted enum out of SkSurface, use in GrTextureProvider 2016-02-25 08:33:02 -08:00
bin Fix gyp-and-sync for windows 2016-02-22 12:59:53 -08:00
cmake update CMakeLists for views/aminated removal 2016-02-27 14:03:39 -08:00
debugger Add gpu implementation of OverdrawXfermode 2016-01-27 05:00:04 -08:00
dm Modernize SkSpinlock. 2016-02-29 10:14:38 -08:00
example There is an unused rowBytes parameter being passed along. 2016-02-16 13:00:02 -08:00
experimental Move Budgeted enum out of SkSurface, use in GrTextureProvider 2016-02-25 08:33:02 -08:00
fuzz Remove FuzzPaeth now that we have some real Fuzzes. 2016-02-18 06:58:13 -08:00
gm tile spans 2016-02-29 07:53:22 -08:00
gyp hack up get_images_from_skps 2016-02-29 09:05:32 -08:00
include Modernize SkSpinlock. 2016-02-29 10:14:38 -08:00
infra Fix Swarming compile out dir 2016-02-29 10:06:33 -08:00
platform_tools Use a statically linked libhwui for testing. 2016-02-16 09:19:36 -08:00
resources SkPDF/Bench: add bench for SkPDFSharedStream (deflate) 2016-02-24 15:17:20 -08:00
samplecode remove xmlparser includes from samples 2016-02-29 09:13:26 -08:00
site Move Budgeted enum out of SkSurface, use in GrTextureProvider 2016-02-25 08:33:02 -08:00
src Modernize SkSpinlock. 2016-02-29 10:14:38 -08:00
tests Enable RAW codec for Windows 2016-02-29 07:14:42 -08:00
third_party Update shaderc lib and use single combined lib 2016-02-25 09:47:33 -05:00
tools Revert of DM: disable ignored and very niche configs on bots. (patchset #1 id:1 of https://codereview.chromium.org/1745073002/ ) 2016-02-29 09:51:09 -08:00
.gitignore Add skia.conf (configuration file that supports printShaders, etc...) to .gitignore 2016-02-24 15:38:48 -08:00
AUTHORS use malloc/calloc/free instead of moz_malloc/moz_calloc/moz_free in ports/SkMemory_mozalloc.cpp 2015-11-23 10:30:14 -08:00
codereview.settings Automatically add a docs preview link and NOTRY=true when there are only docs changes. 2015-02-26 10:16:13 -08:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Update PIEX: Prepares support for uncompressed thumbnails 2016-02-23 06:18:14 -08:00
Doxyfile Documentation: SkCanvas API 2015-05-19 10:21:29 -07:00
gyp_skia gyp_skia: use path python, be quiet 2016-02-19 11:43:57 -08:00
gyp_skia.py Roll gyp deps from 1765 to 1796. 2013-11-21 18:11:14 +00:00
LICENSE Include resources directory in google3 sync. 2015-10-20 13:00:48 -07:00
make.bat Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
make.py GYP: remove stale skia_scalar gyp variable 2015-11-10 13:25:12 -05:00
Makefile Add visualbench as valid target to Makefile 2015-12-18 08:05:06 -08:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py 10.9 is no more 2016-02-25 06:52:18 -08:00
public.bzl Cleanups related to SkFixed. 2016-02-25 10:28:11 -08:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
SK_IMAGE_VERSION Update SK_IMAGE_VERSION to 3 2016-02-23 08:14:19 -08:00
skia.gyp Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
SKP_VERSION Update SKP version 2016-02-28 00:27:30 -08:00
whitespace.txt Test build scheduler. 2016-02-19 03:47:53 -08:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.