gtk/gdk/gdksubsurface.c.rej
Matthias Clasen 3f9bdaa4c8 Add background to subsurfaces
Make it possible for subsurfaces to have a black background on a
secondary subsurface below the actual subsurface. Using a single-pixel
buffer for that background increases the changes that the compositor
will use direct scanout for the actual subsurface.

This changes the private subsurface API. All callers have been
updated to pass an empty background rect.
2024-04-15 19:53:46 -04:00

17 lines
525 B
Plaintext

--- gdk/gdksubsurface.c
+++ gdk/gdksubsurface.c
@@ -213,3 +213,13 @@ gdk_subsurface_get_transform (GdkSubsurface *subsurface)
return GDK_SUBSURFACE_GET_CLASS (subsurface)->get_transform (subsurface);
}
+void
+gdk_subsurface_get_background (GdkSubsurface *subsurface,
+ graphene_rect_t *background)
+{
+ g_return_if_fail (GDK_IS_SUBSURFACE (subsurface));
+ g_return_if_fail (background != NULL);
+
+ GDK_SUBSURFACE_GET_CLASS (subsurface)->get_background (subsurface, background);
+}
+