aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkTHash.h
Commit message (Collapse)AuthorAge
* SkTHashTable no longer uses SkNoncopyGravatar Hal Canary2018-06-14
| | | | | | | | | Change-Id: I0944195d3087c97353994ff219f77464d94f1ba8 Reviewed-on: https://skia-review.googlesource.com/135045 Commit-Queue: Hal Canary <halcanary@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* trim #include <new> from SkPostConfig.hGravatar Mike Klein2018-06-11
| | | | | | | Change-Id: I693ddcd4ade101ba4eb4102e03adce183aa1d672 Reviewed-on: https://skia-review.googlesource.com/133829 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* include/private/SkTemplates: Cleanup bare pointers.Gravatar Hal Canary2018-04-24
| | | | | | | | | | | | | | | | | include/private: - SkAutoTArray, SkAutoTMalloc no longer use bare pointers to owned memory, - SkTHash and SkAutoTArray are now std::move()able. - SkAutoTArray::swap no longer neccesary. - SkAutoTMalloc::operator=() defined. src/pdf: - SkPDFCanon and SkPDFObjectSerializer are now std::move()able. - `template <class T> static void renew(T* t) { t->~T(); new (t) T; }` is gone. Change-Id: I2f36a0780c47d1427a85da240121c898387fb4cf Reviewed-on: https://skia-review.googlesource.com/123401 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Add mock config to tools and run through gms and benchs without crashing.Gravatar Brian Salomon2017-07-07
| | | | | | | Change-Id: I7e2474129ef2b15899ad2baeb8d18f39d05da98c Reviewed-on: https://skia-review.googlesource.com/21820 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Fix SkTHashTable dangling valuesGravatar Florin Malita2017-03-10
| | | | | | | | | | | | | | The element rearrange logic in SkTHashTable::remove() marks empty slots as such, but does not reset their value. When breaking out of the rearrange loop, we must also reset the last empty slot value to avoid retaining unwanted copies. Change-Id: I8ba2a25088c0aa5210277124e0917224cb295691 Reviewed-on: https://skia-review.googlesource.com/9533 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* simplify SkTHash* move supportGravatar Mike Klein2016-12-15
| | | | | | | | | | | Don't know why I thought this had to be so complicated before. BUG=skia:6053 Change-Id: Ie714fed1cb47e9add166d4227d3d31f95eba2411 Reviewed-on: https://skia-review.googlesource.com/6121 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove tombstones from SkTHash.Gravatar Herb Derby2016-12-14
| | | | | | | | | | | | * Switch to linear probing - this allows delete to rearrange elements to fill in empty slots * NULL -> nullptr Change-Id: I741c2f3bb2734bf638d0c0a78c6cc549f563a5d9 Reviewed-on: https://skia-review.googlesource.com/5980 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* add move semantics to SkTHash*Gravatar Mike Klein2016-12-13
| | | | | | | | | | | | | | | | The more I look at std::unordered_map and co., the less I like them. I think we might want to bet on SkTHash*. As a simple first improvement, add move support. Next comes shrinking, and then I'll start moving over SkTDynamicHash users. BUG=skia:6053 Change-Id: Ifdb5d713aab66434ca271c7f18a0cbbb0720099c Reviewed-on: https://skia-review.googlesource.com/5943 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* SkTHash: hash from fnptr to functor typeGravatar mtklein2015-10-15
| | | | | | | | Passing &SkGoodHash to SkTHashMap and SkTHashSet doesn't guarantee that it's actually instantiated. Using a functor does. BUG=skia: Review URL: https://codereview.chromium.org/1405053002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Add approxBytesUsed to hashes.Gravatar mtklein2015-08-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1280653003
* Move SkTHash.h to include/private.Gravatar mtklein2015-07-28
| | | | | | | | | | | | | | | include/views/SkOSWindow_Win.h includes it. To move SkTHash.h to include/private, SkChecksum.h needs to go there too. To move SkChecksum.h to include/private, SkTLogic needs to go there too. This adds a bunch of -Iinclude/private to tools.gyp I missed in the last CL. No public API changes. TBR=reed@google.com BUG=skia:4126 Review URL: https://codereview.chromium.org/1260613006
* Revert "Move headers used by headers in include/ to include/private."Gravatar Mike Klein2015-07-01
| | | | | | | | This reverts commit 928e16565f3e69cd6661e9ad300ac17e3f33c0c8. BUG=skia: Review URL: https://codereview.chromium.org/1213093004.
* Move headers used by headers in include/ to include/private.Gravatar mtklein2015-07-01
| | | | | | | | | | | Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h used by (public) SkPictureRecorder.h. BUG=skia: Committed: https://skia.googlesource.com/skia/+/a89f55198bdc58f0b6f6196907ab25a6afc1a661 Review URL: https://codereview.chromium.org/1217293004
* Revert "Move headers used by headers in include/ to include/private."Gravatar jvanverth2015-07-01
| | | | | | | | | | | | | This reverts commit a89f55198bdc58f0b6f6196907ab25a6afc1a661. Reason: breaking the roll. TBR=mtklein@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1216033008
* Move headers used by headers in include/ to include/private.Gravatar mtklein2015-07-01
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h used by (public) SkPictureRecorder.h. BUG=skia: Review URL: https://codereview.chromium.org/1217293004