emersion / libliftoff

Lightweight KMS plane library
MIT License
75 stars 7 forks source link

Unclear when a layer needs composition #54

Closed emersion closed 3 years ago

emersion commented 3 years ago

Right now, compositors are expected to query liftoff_layer_get_plane_id to decide whether a layer needs to be composited.

However there are cases where a layer has no plane, but still doesn't need composition (e.g. when FB_ID is zero or when alpha is zero, in the future when the layer is out of CRTC bounds etc).

API proposal:

bool liftoff_layer_needs_composition(struct liftoff_layer *layer);
bool liftoff_output_needs_composition(struct liftoff_output *output);

These names might be slightly misleading, because setting a composition layer is optional.