compositor: Downgrade rather than drop buffer reference when copied
When the renderer/backend indicate that they do not need a surface's buffer content to be preserved, most often because they have copied it, simply downgrade the buffer reference to 'will not access', rather than drop the buffer reference altogether. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
@@ -2734,7 +2734,7 @@ output_accumulate_damage(struct weston_output *output)
|
|||||||
*/
|
*/
|
||||||
if (!pnode->surface->keep_buffer) {
|
if (!pnode->surface->keep_buffer) {
|
||||||
weston_buffer_reference(&pnode->surface->buffer_ref,
|
weston_buffer_reference(&pnode->surface->buffer_ref,
|
||||||
NULL,
|
pnode->surface->buffer_ref.buffer,
|
||||||
BUFFER_WILL_NOT_BE_ACCESSED);
|
BUFFER_WILL_NOT_BE_ACCESSED);
|
||||||
weston_buffer_release_reference(
|
weston_buffer_release_reference(
|
||||||
&pnode->surface->buffer_release_ref, NULL);
|
&pnode->surface->buffer_release_ref, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user