1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-20 11:33:09 -08:00

Fix subpixel AA with alpha-background on Cairo on X

* xterm.c (x_set_cr_source_with_gc_foreground)
(x_set_cr_source_with_gc_background): Set operator back to OVER
if alpha-background isn't to be respected.
This commit is contained in:
Po Lu 2022-04-09 08:41:00 +08:00
parent 0b16e4e1f1
commit bb7623b9be

View file

@ -4240,8 +4240,11 @@ x_set_cr_source_with_gc_foreground (struct frame *f, GC gc,
cairo_set_operator (FRAME_CR_CONTEXT (f), CAIRO_OPERATOR_SOURCE);
}
else
cairo_set_source_rgb (FRAME_CR_CONTEXT (f), color.red / 65535.0,
color.green / 65535.0, color.blue / 65535.0);
{
cairo_set_source_rgb (FRAME_CR_CONTEXT (f), color.red / 65535.0,
color.green / 65535.0, color.blue / 65535.0);
cairo_set_operator (FRAME_CR_CONTEXT (f), CAIRO_OPERATOR_OVER);
}
}
void
@ -4269,8 +4272,11 @@ x_set_cr_source_with_gc_background (struct frame *f, GC gc,
cairo_set_operator (FRAME_CR_CONTEXT (f), CAIRO_OPERATOR_SOURCE);
}
else
cairo_set_source_rgb (FRAME_CR_CONTEXT (f), color.red / 65535.0,
color.green / 65535.0, color.blue / 65535.0);
{
cairo_set_source_rgb (FRAME_CR_CONTEXT (f), color.red / 65535.0,
color.green / 65535.0, color.blue / 65535.0);
cairo_set_operator (FRAME_CR_CONTEXT (f), CAIRO_OPERATOR_OVER);
}
}
static const cairo_user_data_key_t xlib_surface_key, saved_drawable_key;