~ubuntu-branches/ubuntu/wily/mir/wily-proposed

« back to all changes in this revision

Viewing changes to tests/integration-tests/compositor/test_buffer_stream.cpp

  • Committer: Package Import Robot
  • Author(s): Alexandros Frantzis
  • Date: 2015-10-08 16:12:19 UTC
  • mto: This revision was merged to the branch mainline in revision 109.
  • Revision ID: package-import@ubuntu.com-20151008161219-emk4a1ys51yy0wjb
Tags: upstream-0.17.0+15.10.20151008.2
ImportĀ upstreamĀ versionĀ 0.17.0+15.10.20151008.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
300
300
namespace
301
301
{
302
302
 
303
 
void client_loop(int nframes, BufferStreamSurfaces& stream)
 
303
void client_loop(mg::Buffer*& out_buffer, int nframes, BufferStreamSurfaces& stream)
304
304
{
305
 
    mg::Buffer* out_buffer{nullptr};
306
305
    for (int f = 0; f < nframes; f++)
307
306
    {
308
307
        stream.swap_client_buffers_blocking(out_buffer);
351
350
    std::atomic<bool> done;
352
351
    done = false;
353
352
 
 
353
    mg::Buffer* out_buffer{nullptr};
 
354
 
 
355
    // Ensure we've posted a buffer before we start the snapshot loop
 
356
    buffer_stream.swap_client_buffers_blocking(out_buffer);
 
357
    buffer_stream.swap_client_buffers_blocking(out_buffer);
 
358
 
354
359
    std::thread client(client_loop,
 
360
                       std::ref(out_buffer),
355
361
                       num_frames,
356
362
                       std::ref(buffer_stream));
357
363