Mir
buffer_sink.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 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: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_FRONTEND_BUFFER_SINK_H_
20 #define MIR_FRONTEND_BUFFER_SINK_H_
21 
25 #include <string>
26 
27 namespace mir
28 {
29 namespace graphics { class Buffer; }
30 namespace frontend
31 {
33 {
34 public:
35  virtual ~BufferSink() = default;
36 
37  virtual void send_buffer(frontend::BufferStreamId id, graphics::Buffer& buffer, graphics::BufferIpcMsgType) = 0;
38  virtual void add_buffer(graphics::Buffer&) = 0;
39  virtual void error_buffer(geometry::Size req_size, MirPixelFormat req_format, std::string const& error_msg) = 0;
40  virtual void remove_buffer(graphics::Buffer&) = 0;
41  virtual void update_buffer(graphics::Buffer&) = 0;
42 
43 protected:
44  BufferSink() = default;
45  BufferSink(BufferSink const&) = delete;
46  BufferSink& operator=(BufferSink const&) = delete;
47 };
48 }
49 } // namespace mir
50 
51 #endif // MIR_FRONTEND_BUFFER_SINK_H_
Definition: size.h:30
Definition: as_render_target.h:27
BufferIpcMsgType
Definition: platform_ipc_operations.h:29
Definition: buffer_sink.h:32
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:241
Definition: buffer.h:44

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 13:49:26 UTC 2017