~chasedouglas/+junk/client-lib

« back to all changes in this revision

Viewing changes to include/mir/compositor/buffer_texture_binder.h

  • Committer: Alan Griffiths
  • Date: 2012-07-06 16:48:49 UTC
  • mfrom: (28.4.63 add-bm-client)
  • Revision ID: alan@octopull.co.uk-20120706164849-4g2i72hplzgbvuwa
Refine interfaces surrounding the BufferBundle

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef MIR_COMPOSITOR_BUFFER_TEXTURE_BINDER_H_
20
20
#define MIR_COMPOSITOR_BUFFER_TEXTURE_BINDER_H_
21
21
 
 
22
#include <memory>
 
23
 
22
24
namespace mir
23
25
{
24
 
 
25
 
namespace surfaces
26
 
{
27
 
class SurfacesToRender;
28
 
}
29
 
 
30
 
namespace graphics
31
 
{
32
 
class Texture;
33
 
}
 
26
namespace graphics { class Texture; }
34
27
 
35
28
namespace compositor
36
29
{
37
 
 
 
30
class Buffer;
38
31
 
39
32
class BufferTextureBinder
40
33
{
41
 
public:
42
 
 
43
 
    virtual void bind_buffer_to_texture(surfaces::SurfacesToRender const&) = 0;
44
 
 
45
 
protected:
 
34
 public:
 
35
 
 
36
    std::shared_ptr<graphics::Texture> lock_and_bind_back_buffer();
 
37
 
 
38
 protected:
46
39
    BufferTextureBinder() = default;
47
 
    ~BufferTextureBinder() = default;
48
 
private:
 
40
    ~BufferTextureBinder() {}
 
41
 
 
42
 private:
49
43
    BufferTextureBinder(BufferTextureBinder const&) = delete;
50
44
    BufferTextureBinder& operator=(BufferTextureBinder const&) = delete;
 
45
 
 
46
    virtual void lock_back_buffer() = 0;
 
47
    virtual void unlock_back_buffer() = 0;
 
48
 
 
49
    virtual std::shared_ptr<Buffer> back_buffer() = 0;
51
50
};
52
51
}
53
52
}