~hikiko/mir/mir.unity8-desktop-session

« back to all changes in this revision

Viewing changes to tests/integration-tests/test_session.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Daniel van Vugt, Ubuntu daily release
  • Date: 2014-01-08 02:04:38 UTC
  • mfrom: (1.1.54)
  • Revision ID: package-import@ubuntu.com-20140108020438-ikbu7qqm9v2l026y
Tags: 0.1.3+14.04.20140108-0ubuntu1
[ Daniel van Vugt ]
* Preparing for release 0.1.3

[ Ubuntu daily release ]
* Automatic snapshot from revision 1170

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
    {
88
88
        struct StubRenderer : public mc::Renderer
89
89
        {
90
 
            void clear(unsigned long) override {}
91
 
            void render(std::function<void(std::shared_ptr<void> const&)>,
92
 
                        mc::CompositingCriteria const&, mc::BufferStream& stream)
93
 
            {
94
 
                stream.lock_compositor_buffer(0);
95
 
            }
96
 
 
97
 
            void ensure_no_live_buffers_bound() {}
 
90
            void clear() const override
 
91
            {
 
92
            }
 
93
            void render(mc::CompositingCriteria const&, mg::Buffer&) const override
 
94
            {
 
95
            }
98
96
        };
99
97
 
100
98
        struct StubRendererFactory : public mc::RendererFactory
181
179
    std::thread client_thread{
182
180
        [&session]
183
181
        {
 
182
            mg::Buffer* buffer{nullptr};
184
183
            for (int i = 0; i < 500; ++i)
185
184
            {
186
185
                auto surface = session.default_surface();
187
 
                surface->advance_client_buffer();
 
186
                surface->swap_buffers(buffer);
188
187
                std::this_thread::sleep_for(std::chrono::microseconds{50});
189
188
            }
190
189
        }};