Skip to content

Commit

Permalink
fixup! backend: add new backend interface according to #1191
Browse files Browse the repository at this point in the history
  • Loading branch information
yshui committed Apr 2, 2024
1 parent 3088cbc commit ab95f20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/backend/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ typedef struct {

struct backend_mask {
/// Mask image, can be NULL.
///
/// Mask image must be an image that was created with the `BACKEND_IMAGE_FORMAT_MASK`
/// format. Using an image with a wrong format as mask is undefined behavior.
image_handle image;
/// Clip region, in source image's coordinate.
region_t region;
Expand Down Expand Up @@ -175,6 +178,7 @@ struct backend_blit_args {
enum backend_image_format {
/// A format that can be used for normal rendering, and binding
/// X pixmaps.
/// Images created with `bind_pixmap` have this format automatically.
BACKEND_IMAGE_FORMAT_PIXMAP,
/// A format that can be used for masks.
BACKEND_IMAGE_FORMAT_MASK,
Expand Down

0 comments on commit ab95f20

Please sign in to comment.