va: pool: simplify the logic
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 12 Feb 2021 12:26:24 +0000 (13:26 +0100)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 17 Feb 2021 08:10:37 +0000 (09:10 +0100)
commit1ee9b202a6def211bc1081aa6b40464d0c258b52
tree3e8a20185603487553856e6ac4b0f6f320943216
parent8deec238cba69818d32af78f516cb9dd728863d7
va: pool: simplify the logic

Instead of removing memories from buffers at reset_buffer()/release_buffer() the
bufferpool operation is kept as originally designed, still the allocator pool is
used too. Thus, this patch restores the buffer size configuration while removing
release_buffer(), reset_buffer() and acquire_buffer() vmethods overloads.

Then, when the bufferpool base class decides to discard a buffer, the VA
surface-based memory is returned to the allocator pool when its last reference
is freed, and later reused if a new buffer is allocated again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>
sys/va/gstvapool.c