diff --git a/src/wayland/meta-wayland-single-pixel-buffer.c b/src/wayland/meta-wayland-single-pixel-buffer.c index e57d831f0..5b23b917a 100644 --- a/src/wayland/meta-wayland-single-pixel-buffer.c +++ b/src/wayland/meta-wayland-single-pixel-buffer.c @@ -169,6 +169,15 @@ meta_wayland_single_pixel_buffer_free (MetaWaylandSinglePixelBuffer *single_pixe g_free (single_pixel_buffer); } +gboolean +meta_wayland_single_pixel_buffer_is_opaque_black (MetaWaylandSinglePixelBuffer *single_pixel_buffer) +{ + return (single_pixel_buffer->a == UINT32_MAX && + single_pixel_buffer->r == 0x0 && + single_pixel_buffer->g == 0x0 && + single_pixel_buffer->b == 0x0); +} + void meta_wayland_init_single_pixel_buffer_manager (MetaWaylandCompositor *compositor) { diff --git a/src/wayland/meta-wayland-single-pixel-buffer.h b/src/wayland/meta-wayland-single-pixel-buffer.h index a52166096..00af95a87 100644 --- a/src/wayland/meta-wayland-single-pixel-buffer.h +++ b/src/wayland/meta-wayland-single-pixel-buffer.h @@ -35,3 +35,5 @@ MetaWaylandSinglePixelBuffer * meta_wayland_single_pixel_buffer_from_buffer (Met void meta_wayland_init_single_pixel_buffer_manager (MetaWaylandCompositor *compositor); void meta_wayland_single_pixel_buffer_free (MetaWaylandSinglePixelBuffer *single_pixel_buffer); + +gboolean meta_wayland_single_pixel_buffer_is_opaque_black (MetaWaylandSinglePixelBuffer *single_pixel_buffer);