diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-15 17:01:18 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-15 23:40:02 +0000 |
commit | 8050ced6204f5aca12e6c57f86308b6ad1b98209 (patch) | |
tree | 3c58e93cbb3f552aa22f027a46d7a8fa1b24e91e | |
parent | fc046aabde76142fce130773d78d797d7d750ab7 (diff) |
sna/dri: Mark bo as reusable after completion of a flip-event
After the flip chain is completed, any residual buffers are no longer in
use and so available for reuse.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index c83d5809..0689fc5a 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -721,12 +721,18 @@ sna_dri_frame_event_info_free(struct sna_dri_frame_event *info) _sna_dri_destroy_buffer(info->sna, info->front); _sna_dri_destroy_buffer(info->sna, info->back); - if (info->old_front.bo) + if (info->old_front.bo) { + info->old_front.bo->reusable = true; kgem_bo_destroy(&info->sna->kgem, info->old_front.bo); - if (info->next_front.bo) + } + if (info->next_front.bo) { + info->next_front.bo->reusable = true; kgem_bo_destroy(&info->sna->kgem, info->next_front.bo); - if (info->cache.bo) + } + if (info->cache.bo) { + info->cache.bo->reusable = true; kgem_bo_destroy(&info->sna->kgem, info->cache.bo); + } free(info); } |