Mir
buffer_stream_factory.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by:
17  * Alan Griffiths <alan@octopull.co.uk>
18  * Thomas Voss <thomas.voss@canonical.com>
19  */
20 
21 #ifndef MIR_COMPOSITOR_BUFFER_STREAM_FACTORY_H_
22 #define MIR_COMPOSITOR_BUFFER_STREAM_FACTORY_H_
23 
26 
27 #include <memory>
28 
29 namespace mir
30 {
31 namespace graphics
32 {
33 class GraphicBufferAllocator;
34 }
35 namespace compositor
36 {
37 
39 {
40 public:
41  BufferStreamFactory(std::shared_ptr<graphics::GraphicBufferAllocator> const& gralloc,
42  std::shared_ptr<FrameDroppingPolicyFactory> const& policy_factory,
43  unsigned int nbuffers);
44 
45  virtual ~BufferStreamFactory() {}
46 
47  virtual std::shared_ptr<compositor::BufferStream> create_buffer_stream(
48  frontend::BufferStreamId, std::shared_ptr<frontend::ClientBuffers> const& sink,
49  int nbuffers, graphics::BufferProperties const& buffer_properties) override;
50  virtual std::shared_ptr<BufferStream> create_buffer_stream(
51  frontend::BufferStreamId, std::shared_ptr<frontend::ClientBuffers> const& sink,
52  graphics::BufferProperties const&) override;
53  virtual std::shared_ptr<frontend::ClientBuffers> create_buffer_map(
54  std::shared_ptr<frontend::BufferSink> const& sink) override;
55 
56 private:
57  std::shared_ptr<graphics::GraphicBufferAllocator> gralloc;
58  std::shared_ptr<FrameDroppingPolicyFactory> const policy_factory;
59  unsigned int const nbuffers;
60 };
61 
62 }
63 }
64 
65 
66 #endif /* MIR_COMPOSITOR_BUFFER_STREAM_FACTORY_H_ */
All things Mir.
Definition: atomic_callback.h:25
Definition: buffer_stream_factory.h:38
virtual ~BufferStreamFactory()
Definition: buffer_stream_factory.h:45
Buffer creation properties.
Definition: buffer_properties.h:48
Definition: buffer_stream_factory.h:34

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016