aboutsummaryrefslogtreecommitdiff
path: root/fastiv-view.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-15 09:28:16 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-15 14:21:22 +0100
commit11b796945941d33beff624dabdbb20fbc0aabe3c (patch)
tree51e8e1cdfc929d16dabd383178c9de34decca0dc /fastiv-view.c
parente835c889a178d2bdfcf52220e461ecfcd9067afb (diff)
downloadfiv-11b796945941d33beff624dabdbb20fbc0aabe3c.tar.gz
fiv-11b796945941d33beff624dabdbb20fbc0aabe3c.tar.xz
fiv-11b796945941d33beff624dabdbb20fbc0aabe3c.zip
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.
Diffstat (limited to 'fastiv-view.c')
-rw-r--r--fastiv-view.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fastiv-view.c b/fastiv-view.c
index 700dc9b..a9ba5cf 100644
--- a/fastiv-view.c
+++ b/fastiv-view.c
@@ -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