[gtk4] consider gtk4-native drawing
While drawing with cairo works fine in the gtk4 port, we may want to consider using gtk4-native drawing there, instead.
From #2550 (comment 1420552):
As it were, did you have thoughts on using GSK features for snapshotting? Would you want a second DrawingContext for GSK instead of drawing-cairo.cc? We can always use fallback nodes (cairo recording surface + GPU texture upload) for the cases that we don't have an equivalent snapshot. That way the typical case is fast, and the less typical case (sixel?) still works.
Yes, I'd probably make a GSKDrawingContext
and templatise Terminal::draw_cells()
so it can take a (to-be-renamed) CairoDrawingContext
on gtk3 (and printing), and GSKDrawingContext
on gtk4. We do need to fall back to cairo for the hand-drawn characters (minifont.cc
). (Maybe also use an atlas to cache the glyphs on the GPU instead of what fonts-pangocairo.cc
does on gtk3, but AFAICT all this stuff is private in gtk4 and not accessible from outside?)
Not sure yet what sixel drawing will require, since it needs to be re-done anyway on gtk3 too.