From 32f1967142a078ecdb4222c05d62c75710fb74fa Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Fri, 18 Jun 2021 11:13:17 -0400 Subject: iconcache: Read icons into cairo surfaces We internally read icons as cairo surfaces before converting them to GdkPixbuf. This will allow us to eventually delete a lot of GdkPixbuf manipulation and simplify the drawing codepath. --- src/include/ui.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/include') diff --git a/src/include/ui.h b/src/include/ui.h index c02e78a2..6fcbd290 100644 --- a/src/include/ui.h +++ b/src/include/ui.h @@ -137,14 +137,15 @@ void meta_ui_window_menu_popup (MetaWindowMenu *menu, guint32 timestamp); void meta_ui_window_menu_free (MetaWindowMenu *menu); -GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest, - Pixmap xpixmap, - int src_x, - int src_y, - int dest_x, - int dest_y, - int width, - int height); +cairo_surface_t* meta_cairo_surface_get_from_pixmap (Display *display, + Pixmap xpixmap, + int scale); + +GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap, + int src_x, + int src_y, + int width, + int height); /* Used when we have a server grab and draw all over everything, * then we need to handle exposes after doing that, instead of @@ -153,10 +154,10 @@ GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest, void meta_ui_push_delay_exposes (MetaUI *ui); void meta_ui_pop_delay_exposes (MetaUI *ui); -GdkPixbuf* meta_ui_get_default_window_icon (MetaUI *ui); -GdkPixbuf* meta_ui_get_default_mini_icon (MetaUI *ui); -GdkPixbuf* meta_ui_get_window_icon_from_name (MetaUI *ui, char *name); -GdkPixbuf* meta_ui_get_mini_icon_from_name (MetaUI *ui, char *name); +cairo_surface_t* meta_ui_get_default_window_icon (MetaUI *ui); +cairo_surface_t* meta_ui_get_default_mini_icon (MetaUI *ui); +cairo_surface_t* meta_ui_get_window_icon_from_name (MetaUI *ui, char *name); +cairo_surface_t* meta_ui_get_mini_icon_from_name (MetaUI *ui, char *name); gboolean meta_ui_window_should_not_cause_focus (Display *xdisplay, Window xwindow); -- cgit v1.2.1