~vanvugt/mir/remove-input-resampling-standalone

« back to all changes in this revision

Viewing changes to tests/test_renderloop.cpp

  • Committer: Alan Griffiths
  • Date: 2012-06-20 11:29:43 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: alan@octopull.co.uk-20120620112943-8kene478w36mdf6l
Split classes into headers

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "mir/graphics/framebuffer_backend.h"
 
2
#include "mir/compositor/drawer.h"
 
3
#include "mir/compositor/compositor.h"
 
4
 
1
5
#include <gmock/gmock.h>
2
6
#include <gtest/gtest.h>
3
7
 
5
9
{
6
10
namespace graphics
7
11
{
8
 
// framebuffer_backend is the interface compositor uses onto graphics/libgl
9
 
class framebuffer_backend
10
 
{
11
 
public:
12
 
        virtual void render() = 0;
13
 
};
14
 
 
15
12
class display;
16
 
}
17
 
 
18
 
namespace surfaces
19
 
{
20
 
// scenegraph is the interface compositor uses onto the surface stack
21
 
class scenegraph;
22
 
}
23
 
 
24
 
namespace compositor
25
 
{
26
 
 
27
 
// renderer is the interface by which "graphics/libgl" knows
28
 
// the compositor.
29
 
class drawer
30
 
{
31
 
public:
32
 
        virtual void render(graphics::display* display) = 0;
33
 
protected:
34
 
        drawer() = default;
35
 
        ~drawer() = default;
36
 
        drawer& operator=(drawer const&) = delete;
37
 
        drawer(drawer const&) = delete;
38
 
};
39
 
 
40
 
class compositor : public drawer
41
 
{
42
 
public:
43
 
        explicit compositor(surfaces::scenegraph* scenegraph) : scenegraph(scenegraph) {}
44
 
        virtual void render(graphics::display* display) { /*TODO*/ }
45
 
 
46
 
private:
47
 
        surfaces::scenegraph* scenegraph;
48
 
};
49
 
 
50
13
}}
51
14
 
52
15
namespace mc = mir::compositor;