util/disk_cache: Add compression in blob cb path
authorRob Clark <robdclark@chromium.org>
Fri, 28 Oct 2022 19:02:33 +0000 (12:02 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 8 Nov 2022 23:36:51 +0000 (23:36 +0000)
commitd831fd40c873a7acfe47e449874df5c92599e312
treef48bd285957add331ef063dc9b20bf173d83c2b2
parent2fdc3846e715d3cd822c6d778e78cf069714428d
util/disk_cache: Add compression in blob cb path

Android's implementation of the blob-cache get/put funcs do not
implement any compression.  And the default cache size is rather small,
at 2MB (!!) per app (although I assume everyone patches android to
increase the size limit).

We don't bother compressing the has_key/put_key path, since that path is
only storing a uint32_t.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19387>
src/util/disk_cache.c