diff options
author | Robin Watts <robin.watts@artifex.com> | 2018-03-26 17:27:43 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2018-04-03 22:27:39 +0800 |
commit | 73867ca96bbd6f45ffafde234c22cbcf0489ea57 (patch) | |
tree | cba2fed0d7e94fcf6a069170b205c1c0dcd22282 /include | |
parent | b8dd674459a15ccffe49eff0c2b89dd0e22ac393 (diff) | |
download | mupdf-73867ca96bbd6f45ffafde234c22cbcf0489ea57.tar.xz |
Android: Scavenge on Bitmap.lockPixels() failure.
If Bitmap.lockPixels fails with an allocation error, scavenge in
the store.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/store.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/mupdf/fitz/store.h b/include/mupdf/fitz/store.h index 5b048ed0..7dff6c30 100644 --- a/include/mupdf/fitz/store.h +++ b/include/mupdf/fitz/store.h @@ -243,6 +243,18 @@ void fz_empty_store(fz_context *ctx); int fz_store_scavenge(fz_context *ctx, size_t size, int *phase); /* + fz_store_scavenge_external: External function for callers to use + to scavenge while trying allocations. + + size: The number of bytes we are trying to have free. + + phase: What phase of the scavenge we are in. Updated on exit. + + Returns non zero if we managed to free any memory. +*/ +int fz_store_scavenge_external(fz_context *ctx, size_t size, int *phase); + +/* fz_shrink_store: Evict items from the store until the total size of the objects in the store is reduced to a given percentage of its current size. |