aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkSpinlock.h
Commit message (Collapse)AuthorAge
* Cache GrColorSpaceXformsGravatar Brian Osman2016-10-20
| | | | | | | | | | | | | | | | | | | | Even with a modest cache, we're going to get nearly 100% hit rate for typical usage scenarios. I'm hoping to avoid the special case caching of sRGB -> destination, and just rely on the more general mechanism. Yes, this is yet-another cache class. I wanted to use one of many that are laying around, but couldn't find a good fit. On the plus side, it's not much code. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3726 Change-Id: I943be5c99f0d691a87ffe8c5bc3067a8eb491fc2 Reviewed-on: https://skia-review.googlesource.com/3726 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add reminders that these classes have constexpr default constructors.Gravatar mtklein2016-04-29
| | | | | | | | We can do this now that we can write "constexpr". GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1936653002 Review-Url: https://codereview.chromium.org/1936653002
* Make Cmake work with debug buildGravatar halcanary2016-03-04
| | | | | | | | | | | | | | | | Before this CL, the following failed to link: cd .../skia git fetch git checkout origin/master git clean -ffdx SKIA="$PWD" cd $(mktemp -d); cmake "${SKIA}/cmake" -DCMAKE_BUILD_TYPE=Debug -G Ninja ninja GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1757993006 Review URL: https://codereview.chromium.org/1757993006
* Modernize SkSpinlock.Gravatar mtklein2016-02-29
| | | | | | | | | | | | | | | | | | | | | | | | - 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
* Move Mutexy things to private.Gravatar herb2015-09-29
There is no API change. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1368333004