Print composition layer in logs

This commit is contained in:
Simon Ser 2020-04-09 18:25:37 +02:00
parent 049077aee5
commit ded5bd083c
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -58,6 +58,7 @@ void liftoff_output_set_composition_layer(struct liftoff_output *output,
void output_log_layers(struct liftoff_output *output) { void output_log_layers(struct liftoff_output *output) {
struct liftoff_layer *layer; struct liftoff_layer *layer;
size_t i; size_t i;
bool is_composition_layer;
if (!log_has(LIFTOFF_DEBUG)) { if (!log_has(LIFTOFF_DEBUG)) {
return; return;
@ -72,7 +73,10 @@ void output_log_layers(struct liftoff_output *output) {
if (!layer_has_fb(layer)) { if (!layer_has_fb(layer)) {
continue; continue;
} }
liftoff_log(LIFTOFF_DEBUG, " Layer %p:", (void *)layer); is_composition_layer = output->composition_layer == layer;
liftoff_log(LIFTOFF_DEBUG, " Layer %p%s:",
(void *)layer, is_composition_layer ?
" (composition layer)" : "");
} }
for (i = 0; i < layer->props_len; i++) { for (i = 0; i < layer->props_len; i++) {