wl_surface_damage

mark part of the surface damaged

This request is used to describe the regions where the pending buffer is different from the current surface contents, and where the surface therefore needs to be repainted. The compositor ignores the parts of the damage that fall outside of the surface.

Damage is double-buffered state, see wl_surface.commit.

The damage rectangle is specified in surface-local coordinates, where x and y specify the upper left corner of the damage rectangle.

The initial value for pending damage is empty: no damage. wl_surface.damage adds pending damage: the new pending damage is the union of old pending damage and the given rectangle.

wl_surface.commit assigns pending damage as the current damage, and clears pending damage. The server will clear the current damage as it repaints the surface.

Alternatively, damage can be posted with wl_surface.damage_buffer which uses buffer coordinates instead of surface coordinates, and is probably the preferred and intuitive way of doing this.

extern (D)
void
wl_surface_damage
(,
int x
,
int y
,
int width
,
int height
)

Meta