]> git.eshelyaron.com Git - emacs.git/commit
Correctly cache images when frames vary in their font metrics
authorPo Lu <luangruo@yahoo.com>
Thu, 20 Jun 2024 09:03:36 +0000 (17:03 +0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 21 Jun 2024 19:00:49 +0000 (21:00 +0200)
commit0ae50f0b04bedce100cfedb0e672b9df414db22a
treec87e5e9d53887b36ecf4f7d050d76823f5c72397
parent3bd0699dc01385ad90a53dd37d7513f708f675e8
Correctly cache images when frames vary in their font metrics

* src/alloc.c (mark_frame): Mark this frame's image cache, if it
exist.
(mark_terminals): Cease marking T->image_cache.

* src/androidfns.c (unwind_create_frame, Fx_create_frame)
(android_create_tip_frame):

* src/haikufns.c (unwind_create_frame, haiku_create_frame)
(haiku_create_tip_frame):

* src/nsfns.m (unwind_create_frame):

* src/pgtkfns.c (unwind_create_frame, Fx_create_frame)
(x_create_tip_frame):

* src/xfns.c (unwind_create_frame, Fx_create_frame)
(x_create_tip_frame):

* src/w32fns.c (unwind_create_frame, Fx_create_frame)
(w32_create_tip_frame): Remove adjustments of the frame image
cache's reference count rendered redundant by the assignment of
image caches to individual frames rather than terminals.

* src/dispextern.h (struct image_cache) <scaling_col_width>: New
field.

* src/frame.c (gui_set_font): In lieu of clearing F's image
cache unconditionally, establish whether the column width as
considered by compute_image_size has changed, and if so, adjust
or reassign the frame's image cache.
(make_frame): Clear F->image_cache.

* src/frame.h (struct frame) <image_cache>: New field.
(FRAME_IMAGE_CACHE): Return F->image_cache.

* src/image.c (make_image_cache): Clear C->scaling_col_width.
(cache_image): Adjust to new means of assigning image caches to
frames.

* src/termhooks.h (struct terminal) <image_cache>: Delete field.

* src/xfaces.c (init_frame_faces): Do image cache assignment
with all new frames.

(cherry picked from commit cebca072c33937b84995a62c35c16441d23bb86d)
13 files changed:
src/alloc.c
src/androidfns.c
src/dispextern.h
src/frame.c
src/frame.h
src/haikufns.c
src/image.c
src/nsfns.m
src/pgtkfns.c
src/termhooks.h
src/w32fns.c
src/xfaces.c
src/xfns.c