mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 01:31:13 +00:00
3f9bdaa4c8
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.
52 lines
1.7 KiB
C
52 lines
1.7 KiB
C
#pragma once
|
|
|
|
#include "gdksubsurfaceprivate.h"
|
|
|
|
#include "wayland-client-protocol.h"
|
|
|
|
typedef struct _GdkWaylandSubsurface GdkWaylandSubsurface;
|
|
typedef struct _GdkWaylandSubsurfaceClass GdkWaylandSubsurfaceClass;
|
|
|
|
#define GDK_TYPE_WAYLAND_SUBSURFACE (gdk_wayland_subsurface_get_type ())
|
|
#define GDK_WAYLAND_SUBSURFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_SUBSURFACE, GdkWaylandSubsurface))
|
|
#define GDK_WAYLAND_SUBSURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WAYLAND_SUBSURFACE, GdkWaylandSubsurfaceClass))
|
|
#define GDK_IS_WAYLAND_SUBSURFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_SUBSURFACE))
|
|
#define GDK_WAYLAND_SUBSURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WAYLAND_SUBSURFACE, GdkWaylandSubsurfaceClass))
|
|
|
|
struct _GdkWaylandSubsurface
|
|
{
|
|
GdkSubsurface parent_instance;
|
|
|
|
struct wl_surface *surface;
|
|
struct wl_subsurface *subsurface;
|
|
struct wp_viewport *viewport;
|
|
|
|
GdkTexture *texture;
|
|
cairo_rectangle_int_t dest;
|
|
graphene_rect_t source;
|
|
enum wl_output_transform transform;
|
|
|
|
struct wl_region *opaque_region;
|
|
|
|
struct wl_callback *frame_callback;
|
|
|
|
struct wl_surface *bg_surface;
|
|
struct wl_subsurface *bg_subsurface;
|
|
struct wp_viewport *bg_viewport;
|
|
cairo_rectangle_int_t bg_rect;
|
|
gboolean bg_attached;
|
|
};
|
|
|
|
struct _GdkWaylandSubsurfaceClass
|
|
{
|
|
GdkSubsurfaceClass parent_class;
|
|
};
|
|
|
|
GType gdk_wayland_subsurface_get_type (void) G_GNUC_CONST;
|
|
|
|
void gdk_wayland_subsurface_request_frame (GdkSubsurface *subsurface);
|
|
void gdk_wayland_subsurface_clear_frame_callback (GdkSubsurface *subsurface);
|
|
|
|
GdkSubsurface * gdk_wayland_surface_create_subsurface (GdkSurface *surface);
|
|
|