Shrink SkTHashTables

Since we grow when size >= 3/4 cap, shrink when size <= 1/4 cap?

Keeping a minimum table size of 4 preserves the invariant that tables
with non-zero capacity always have at least one empty slot, allowing
find() to determine a particular key is not in the table by stumbling
upon that empty slot on the key's hash chain.  That's effectively what
we're asserting at SkTHash.h:84.

Bug: skia:10041
Change-Id: I4247e4ff155fd11561086547525354365bc69f55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277096
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2 files changed