Mir

Code review comment for lp:~vanvugt/mir/earlier-release-2

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

71 + mtd::MockFrameDroppingPolicyFactory policy_factory;
72 + mc::BufferQueue queue{nbuffers, mt::fake_shared(server_buffer_factory),
73 + properties, policy_factory};
74 + queue.allow_framedropping(false);
75 +
76 + mg::Buffer* client_buffer = nullptr;
77 + auto callback = [&](mg::Buffer* buffer)
78 + {
79 + client_buffer = buffer;
80 + };
81 +
82 + auto client_try_acquire = [&]() -> bool
83 + {
84 + queue.client_acquire(callback);
85 + return client_buffer != nullptr;
86 + };

C++11 is shiny bit this is being too clever.

Why aren't queue, client_try_acquire etc. just members of a fixture?

review: Needs Fixing

« Back to merge proposal