summaryrefslogtreecommitdiff
path: root/src/lib/emile/emile_image.c
diff options
context:
space:
mode:
authorjiin.moon <jiin.moon@samsung.com>2017-09-27 11:51:44 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-09-27 11:51:50 -0700
commitd23aca3c8ec60b8db68511ff484b85edadd2f9aa (patch)
treee362b8010952a5395be27b9dc268e6a0a8e34fac /src/lib/emile/emile_image.c
parent1ac4a03d4fbef8ada70a491d15174c8ad93752ef (diff)
emile: unmap the memory for image file after decode.
Summary: In case of emile, unmap the memory of the image file when the image file is closing. But closing of image file happen when the image is flushed from the cache, so the mapped memory of image file remain for long period of time with no benefit (If it is in cache, it won't get decoded again). So I think we don't need to keep the mapped memory of image file. Test Plan: self Reviewers: cedric, jpeg, jypark Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D5210 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/emile/emile_image.c')
-rw-r--r--src/lib/emile/emile_image.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c
index 858e79058a..9a0bdb04c4 100644
--- a/src/lib/emile/emile_image.c
+++ b/src/lib/emile/emile_image.c
@@ -680,6 +680,7 @@ _emile_tgv_data(Emile_Image *image,
680 680
681on_error: 681on_error:
682 if (image->compress) eina_binbuf_free(buffer); 682 if (image->compress) eina_binbuf_free(buffer);
683 _emile_image_file_source_unmap(image);
683 return r; 684 return r;
684} 685}
685 686
@@ -2325,6 +2326,7 @@ done:
2325 2326
2326 jpeg_destroy_decompress(&cinfo); 2327 jpeg_destroy_decompress(&cinfo);
2327 _emile_jpeg_membuf_src_term(&cinfo); 2328 _emile_jpeg_membuf_src_term(&cinfo);
2329 _emile_image_file_source_unmap(image);
2328 return r; 2330 return r;
2329 2331
2330} 2332}