~ubuntu-branches/ubuntu/utopic/mir/utopic-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-03-10 19:28:46 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: package-import@ubuntu.com-20140310192846-rq9qm3ec26yrelo2
Tags: upstream-0.1.6+14.04.20140310
ImportĀ upstreamĀ versionĀ 0.1.6+14.04.20140310

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "mir_test_framework/display_server_test_fixture.h"
29
29
#include "mir_test_doubles/null_display.h"
30
30
#include "mir_test_doubles/stub_display_buffer.h"
 
31
#include "mir_test_doubles/stub_renderer.h"
31
32
 
32
33
#include "mir_toolkit/mir_client_library.h"
33
34
 
88
89
    std::unordered_map<mg::DisplayBuffer*,std::unique_ptr<mc::DisplayBufferCompositor>> display_buffer_compositor_map;
89
90
};
90
91
 
91
 
class StubRenderer : public mc::Renderer
 
92
class StubRenderer : public mtd::StubRenderer
92
93
{
93
94
public:
94
95
    StubRenderer(int render_operations_fd)
96
97
    {
97
98
    }
98
99
 
99
 
    void begin(float) const override
100
 
    {
101
 
    }
102
 
 
103
100
    void render(mc::CompositingCriteria const&, mg::Buffer&) const override
104
101
    {
105
102
        while (write(render_operations_fd, "a", 1) != 1) continue;
106
103
    }
107
104
 
108
 
    void end() const override
109
 
    {
110
 
    }
111
 
 
112
 
    void suspend() override
113
 
    {
114
 
    }
115
 
 
116
105
private:
117
106
    int render_operations_fd;
118
107
};