diff options
| author | Miles Bader | 2007-08-13 13:51:08 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-08-13 13:51:08 +0000 |
| commit | aaf34461ff5804e5cebe163b31e535da72e81d87 (patch) | |
| tree | b096310b459b78e437f08ac0f1f00954840a5db5 /src/image.c | |
| parent | 61d032dfd91b811d59acd7605ac02758be97e912 (diff) | |
| parent | 37cc095b6a175fb5a2fb18fa029eaf3aa3b3fa53 (diff) | |
| download | emacs-aaf34461ff5804e5cebe163b31e535da72e81d87.tar.gz emacs-aaf34461ff5804e5cebe163b31e535da72e81d87.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 846-851)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 88-92)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 242-244)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-31
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/image.c b/src/image.c index d38ca04e083..96335558afa 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1644,6 +1644,8 @@ search_image_cache (f, spec, hash) | |||
| 1644 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); | 1644 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); |
| 1645 | int i = hash % IMAGE_CACHE_BUCKETS_SIZE; | 1645 | int i = hash % IMAGE_CACHE_BUCKETS_SIZE; |
| 1646 | 1646 | ||
| 1647 | if (!c) return NULL; | ||
| 1648 | |||
| 1647 | /* If the image spec does not specify a background color, the cached | 1649 | /* If the image spec does not specify a background color, the cached |
| 1648 | image must have the same background color as the current frame. | 1650 | image must have the same background color as the current frame. |
| 1649 | The foreground color must also match, for the sake of monochrome | 1651 | The foreground color must also match, for the sake of monochrome |
| @@ -1655,13 +1657,10 @@ search_image_cache (f, spec, hash) | |||
| 1655 | for formats that don't use transparency (such as jpeg), or if the | 1657 | for formats that don't use transparency (such as jpeg), or if the |
| 1656 | image spec specifies :background. However, the extra memory | 1658 | image spec specifies :background. However, the extra memory |
| 1657 | usage is probably negligible in practice, so we don't bother. */ | 1659 | usage is probably negligible in practice, so we don't bother. */ |
| 1658 | if (!c) return NULL; | ||
| 1659 | 1660 | ||
| 1660 | for (img = c->buckets[i]; img; img = img->next) | 1661 | for (img = c->buckets[i]; img; img = img->next) |
| 1661 | if (img->hash == hash | 1662 | if (img->hash == hash |
| 1662 | && !NILP (Fequal (img->spec, spec)) | 1663 | && !NILP (Fequal (img->spec, spec)) |
| 1663 | /* If the image spec specifies a background, it doesn't matter | ||
| 1664 | what the frame background is. */ | ||
| 1665 | && img->frame_foreground == FRAME_FOREGROUND_PIXEL (f) | 1664 | && img->frame_foreground == FRAME_FOREGROUND_PIXEL (f) |
| 1666 | && img->frame_background == FRAME_BACKGROUND_PIXEL (f)) | 1665 | && img->frame_background == FRAME_BACKGROUND_PIXEL (f)) |
| 1667 | break; | 1666 | break; |
| @@ -6362,11 +6361,14 @@ png_load (f, img) | |||
| 6362 | PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); | 6361 | PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); |
| 6363 | } | 6362 | } |
| 6364 | } | 6363 | } |
| 6364 | /* The commented-out code checked if the png specifies a default | ||
| 6365 | background color, and uses that. Since we use the current | ||
| 6366 | frame background, it is OK for us to ignore this. | ||
| 6367 | |||
| 6365 | else if (fn_png_get_bKGD (png_ptr, info_ptr, &image_bg)) | 6368 | else if (fn_png_get_bKGD (png_ptr, info_ptr, &image_bg)) |
| 6366 | /* Image contains a background color with which to | ||
| 6367 | combine the image. */ | ||
| 6368 | fn_png_set_background (png_ptr, image_bg, | 6369 | fn_png_set_background (png_ptr, image_bg, |
| 6369 | PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); | 6370 | PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); |
| 6371 | */ | ||
| 6370 | else | 6372 | else |
| 6371 | { | 6373 | { |
| 6372 | /* Image does not contain a background color with which | 6374 | /* Image does not contain a background color with which |