]> git.eshelyaron.com Git - emacs.git/commit
Add some code for transparent frame backgrounds without Cairo
authorPo Lu <luangruo@yahoo.com>
Mon, 24 Jan 2022 04:44:55 +0000 (12:44 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 24 Jan 2022 04:44:55 +0000 (12:44 +0800)
commit45208755d13f23f92edcab4d6959e0fd9423843b
tree95bdca80a788eeedd491e2ae54941ba2af3a7644
parent3a7b158ffd8d468eb92de1de6418b3831f10142b
Add some code for transparent frame backgrounds without Cairo

* src/image.c (svg_load_image): Fix build without native image
transforms.

* src/xfns.c (set_up_x_back_buffer):
(tear_down_x_back_buffer): Free XR picture if present.

* src/xftfont.c (xftfont_get_xft_draw): Fix formatting issue.

* src/xterm.c (x_xr_ensure_picture): New function.
(FRAME_CR_CONTEXT, FRAME_CR_CONTEXT):
(FRAME_CR_SURFACE_DESIRED_WIDTH)
(FRAME_CR_SURFACE_DESIRED_HEIGHT): Move to separate USE_CAIRO
block so the ext data code can be used on builds with XRender as
well.

(x_xr_apply_ext_clip):
(x_xr_reset_ext_clip): New functions.
(x_set_clip_rectangles):
(x_reset_clip_rectangles): Set ext data on XRender as well.
(x_term_init): Look for a picture format appropriate for our
purposes.
(x_clear_area): Use XRenderFillRectangle to draw backgrounds if
available.
(x_xrender_color_from_gc_foreground):
(x_xrender_color_from_gc_background): New functions.

* src/xterm.h (FRAME_X_PICTURE):
(FRAME_X_PICTURE_FORMAT)
(FRAME_CHECK_XR_VERSION): New macros.

(struct x_gc_ext_data): Define on XRender as well.
(struct x_display_info): Define ext_codes when using XRender and
add new field `pict_format'.
(struct x_output): New field `picture'.
src/image.c
src/xfns.c
src/xftfont.c
src/xterm.c
src/xterm.h