diff options
| author | Lars Ingebrigtsen | 2020-12-11 16:02:50 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-12-11 16:02:54 +0100 |
| commit | eebb7c8a699614934e0b054536d9c6f102b59e34 (patch) | |
| tree | 32ff9fea26a45ef3b5d886eeabcae893ab716a5a | |
| parent | 4a700a2f79d5cca64602b7cad30d6485cfe0e449 (diff) | |
| download | emacs-eebb7c8a699614934e0b054536d9c6f102b59e34.tar.gz emacs-eebb7c8a699614934e0b054536d9c6f102b59e34.zip | |
Fix compilation of image.c on non-Cairo systems
* src/image.c (image_frame_cache_size): pixmap->width etc is only
defined on Cairo. Return 0 for now on other systems.
| -rw-r--r-- | src/image.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c index 38887ced25b..8607b33a7a8 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1805,9 +1805,11 @@ image_frame_cache_size (struct frame *f) | |||
| 1805 | { | 1805 | { |
| 1806 | struct image *img = c->images[i]; | 1806 | struct image *img = c->images[i]; |
| 1807 | 1807 | ||
| 1808 | #ifdef USE_CAIRO | ||
| 1808 | if (img) | 1809 | if (img) |
| 1809 | total += img->pixmap->width * img->pixmap->height * | 1810 | total += img->pixmap->width * img->pixmap->height * |
| 1810 | img->pixmap->bits_per_pixel / 8; | 1811 | img->pixmap->bits_per_pixel / 8; |
| 1812 | #endif | ||
| 1811 | } | 1813 | } |
| 1812 | return total; | 1814 | return total; |
| 1813 | } | 1815 | } |