~albaguirre/mir/fix-not-compositing-client-last-posted-buffer-trunk

« back to all changes in this revision

Viewing changes to src/server/compositor/rendering_operator.cpp

  • Committer: Alberto Aguirre
  • Date: 2014-03-18 18:25:58 UTC
  • Revision ID: alberto.aguirre@canonical.com-20140318182558-q7pl6citx12ijxue
Fix not compositing the client's last posted buffer (LP: #1294048, LP: #1294051, LP: #1294053, LP: #1290306)

In single-display cases the number of ready buffers decreases after a buffer is acquired by the rendering operator.
Determine if there will be uncomposited buffers before acquiring a buffer so it works for single and multi display use cases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
void mc::RenderingOperator::operator()(graphics::Renderable const& renderable)
38
38
{
 
39
    uncomposited_buffers |= renderable.buffers_ready_for_compositor() > 1;
39
40
    auto compositor_buffer = renderable.buffer(frameno);
40
41
    renderer.render(renderable, *compositor_buffer);
41
42
    save_resource(compositor_buffer);
42
 
    uncomposited_buffers |= renderable.buffers_ready_for_compositor() > 1;
43
43
}