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 /source | |
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 'source')
-rw-r--r-- | source/fitz/store.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/fitz/store.c b/source/fitz/store.c index f94a8aa2..f0d7c795 100644 --- a/source/fitz/store.c +++ b/source/fitz/store.c @@ -776,6 +776,17 @@ scavenge(fz_context *ctx, size_t tofree) return count != 0; } +int fz_store_scavenge_external(fz_context *ctx, size_t size, int *phase) +{ + int ret; + + fz_lock(ctx, FZ_LOCK_ALLOC); + ret = fz_store_scavenge(ctx, size, phase); + fz_unlock(ctx, FZ_LOCK_ALLOC); + + return ret; +} + int fz_store_scavenge(fz_context *ctx, size_t size, int *phase) { fz_store *store; |