The problem appears to be our new(ish) drop_frame implementation:
void mc::BufferQueue::drop_frame(std::unique_lock<std::mutex> lock)
{
auto buffer_to_give = pop(ready_to_composite_queue);
/* Advance compositor buffer so it always points to the most recent
* client content
*/
if (!contains(current_compositor_buffer, buffers_sent_to_compositor))
{ current_buffer_users.clear();
void const* const impossible_user_id = this; current_buffer_users.push_back(impossible_user_id); std::swap(buffer_to_give, current_compositor_buffer);
}
give_buffer_to_client(buffer_to_give, std::move(lock));
}
The issue is that ready_to_composite_queue.size() == 1, somehow, and so we're actually dropping the newest frame. The complicated swapping logic in the middle (which seems to be an attempt to avoid the problem) appears to be doing nothing, or simply not working.
The problem appears to be our new(ish) drop_frame implementation:
void mc::BufferQueue ::drop_ frame(std: :unique_ lock<std: :mutex> lock) to_composite_ queue); current_ compositor_ buffer, buffers_ sent_to_ compositor) )
current_ buffer_ users.clear( );
current_ buffer_ users.push_ back(impossible _user_id) ;
std::swap( buffer_ to_give, current_ compositor_ buffer) ; buffer_ to_client( buffer_ to_give, std::move(lock));
{
auto buffer_to_give = pop(ready_
/* Advance compositor buffer so it always points to the most recent
* client content
*/
if (!contains(
{
void const* const impossible_user_id = this;
}
give_
}
The issue is that ready_to_ composite_ queue.size( ) == 1, somehow, and so we're actually dropping the newest frame. The complicated swapping logic in the middle (which seems to be an attempt to avoid the problem) appears to be doing nothing, or simply not working.