Support opaque 16-bit images as RGB30 with Wuffs

Do not check whether the window's visual can make use of them,
since they're arguably rare enough.

With transparent images, we're limited by Cairo's formats.
This commit is contained in:
2021-11-15 09:28:16 +01:00
parent e835c889a1
commit 11b7969459
2 changed files with 117 additions and 40 deletions

View File

@@ -181,6 +181,10 @@ fastiv_view_realize(GtkWidget *widget)
gtk_widget_register_window(widget, window);
gtk_widget_set_window(widget, window);
gtk_widget_set_realized(widget, TRUE);
// Without the following call, or the rendering mode set to "recording",
// RGB30 degrades to RGB24.
gdk_window_ensure_native(window);
}
static gboolean