Mercurial > emacs
comparison src/image.c @ 111449:132f2dfd549f
Merge from emacs-23
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 09 Nov 2010 15:07:10 -0500 |
parents | 230a50b33a46 0792cbcb42ed |
children | a5a188ddc758 |
comparison
equal
deleted
inserted
replaced
111448:321fbae3e04d | 111449:132f2dfd549f |
---|---|
1047 c->images[img->id] = NULL; | 1047 c->images[img->id] = NULL; |
1048 | 1048 |
1049 /* Free resources, then free IMG. */ | 1049 /* Free resources, then free IMG. */ |
1050 img->type->free (f, img); | 1050 img->type->free (f, img); |
1051 xfree (img); | 1051 xfree (img); |
1052 | |
1053 /* As display glyphs may still be referring to the image ID, we | |
1054 must garbage the frame (Bug#6426). */ | |
1055 SET_FRAME_GARBAGED (f); | |
1056 } | 1052 } |
1057 } | 1053 } |
1058 | 1054 |
1059 /* Return 1 if the given widths and heights are valid for display; | 1055 /* Return 1 if the given widths and heights are valid for display; |
1060 otherwise, return 0. */ | 1056 otherwise, return 0. */ |
1469 static void | 1465 static void |
1470 uncache_image (struct frame *f, Lisp_Object spec) | 1466 uncache_image (struct frame *f, Lisp_Object spec) |
1471 { | 1467 { |
1472 struct image *img = search_image_cache (f, spec, sxhash (spec, 0)); | 1468 struct image *img = search_image_cache (f, spec, sxhash (spec, 0)); |
1473 if (img) | 1469 if (img) |
1474 free_image (f, img); | 1470 { |
1471 free_image (f, img); | |
1472 /* As display glyphs may still be referring to the image ID, we | |
1473 must garbage the frame (Bug#6426). */ | |
1474 SET_FRAME_GARBAGED (f); | |
1475 } | |
1475 } | 1476 } |
1476 | 1477 |
1477 | 1478 |
1478 /* Free image cache of frame F. Be aware that X frames share images | 1479 /* Free image cache of frame F. Be aware that X frames share images |
1479 caches. */ | 1480 caches. */ |