Mir
client_buffer_stream.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 Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Robert Carr <robert.carr@canonical.com>
17  */
18 
19 #ifndef MIR_CLIENT_CLIENT_BUFFER_STREAM_H_
20 #define MIR_CLIENT_CLIENT_BUFFER_STREAM_H_
21 
23 #include "mir_wait_handle.h"
24 
25 #include <EGL/eglplatform.h>
26 
27 #include <memory>
28 #include <functional>
29 
30 namespace mir
31 {
32 namespace client
33 {
34 class ClientBuffer;
35 class MemoryRegion;
36 
38 {
39 public:
40  virtual MirSurfaceParameters get_parameters() const = 0;
41  virtual std::shared_ptr<ClientBuffer> get_current_buffer() = 0;
42  virtual uint32_t get_current_buffer_id() = 0;
43  virtual EGLNativeWindowType egl_native_window() = 0;
44  virtual MirWaitHandle* next_buffer(std::function<void()> const& done) = 0;
45 
46  virtual std::shared_ptr<MemoryRegion> secure_for_cpu_write() = 0;
47 
48  virtual int swap_interval() const = 0;
49  virtual void set_swap_interval(int interval) = 0;
50 
51 protected:
52  ClientBufferStream() = default;
53  virtual ~ClientBufferStream() = default;
54  ClientBufferStream(const ClientBufferStream&) = delete;
56 };
57 
58 }
59 }
60 
61 #endif /* MIR_CLIENT_CLIENT_BUFFER_STREAM_H_ */
All things Mir.
Definition: buffer_stream.h:37
Definition: mir_wait_handle.h:31
virtual void set_swap_interval(int interval)=0
ClientBufferStream & operator=(const ClientBufferStream &)=delete
virtual MirWaitHandle * next_buffer(std::function< void()> const &done)=0
virtual uint32_t get_current_buffer_id()=0
virtual MirSurfaceParameters get_parameters() const =0
virtual std::shared_ptr< MemoryRegion > secure_for_cpu_write()=0
virtual std::shared_ptr< ClientBuffer > get_current_buffer()=0
virtual int swap_interval() const =0
Definition: client_buffer_stream.h:37
virtual ~ClientBufferStream()=default
virtual EGLNativeWindowType egl_native_window()=0
MirSurfaceParameters is the structure of minimum required information that you must provide to Mir in...
Definition: client_types.h:138

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015