mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2024-12-26 21:59:18 +01:00
Force re-alloc when previous FB_ID was 0
This commit is contained in:
parent
b936348acc
commit
89b37acd98
1 changed files with 6 additions and 6 deletions
12
alloc.c
12
alloc.c
|
@ -503,15 +503,15 @@ static bool layer_needs_realloc(struct liftoff_layer *layer)
|
||||||
|
|
||||||
/* If FB_ID changes from non-zero to zero, we don't need to
|
/* If FB_ID changes from non-zero to zero, we don't need to
|
||||||
* display this layer anymore, so we may be able to re-use its
|
* display this layer anymore, so we may be able to re-use its
|
||||||
* plane for another layer. If FB_ID changes from
|
* plane for another layer. If FB_ID changes from zero to
|
||||||
* non-zero to non-zero, we can try to re-use the previous
|
* non-zero, we might be able to find a plane for this layer.
|
||||||
* allocation. */
|
* If FB_ID changes from non-zero to non-zero, we can try to
|
||||||
|
* re-use the previous allocation. */
|
||||||
if (strcmp(prop->name, "FB_ID") == 0) {
|
if (strcmp(prop->name, "FB_ID") == 0) {
|
||||||
if (prop->value == 0) {
|
if (prop->value == 0 || prop->prev_value == 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/* TODO: check format/modifier is the same. Check
|
/* TODO: check format/modifier is the same? */
|
||||||
* previous value isn't zero. */
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue