Mir
buffer_registrar.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 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:
17  * Kevin DuBois <kevin.dubois@canonical.com>
18  */
19 
20 #ifndef MIR_CLIENT_ANDROID_BUFFER_REGISTRAR_H_
21 #define MIR_CLIENT_ANDROID_BUFFER_REGISTRAR_H_
22 
23 #include "mir_toolkit/common.h"
26 #include "mir/geometry/rectangle.h"
27 #include <cutils/native_handle.h>
28 #include <memory>
29 
30 namespace mir
31 {
32 namespace client
33 {
34 class MemoryRegion;
35 
36 namespace android
37 {
39 {
40 public:
41  virtual ~BufferRegistrar() = default;
42  virtual std::shared_ptr<graphics::NativeBuffer> register_buffer(
43  MirBufferPackage const& package,
44  MirPixelFormat pf) const = 0;
45  virtual std::shared_ptr<char> secure_for_cpu(
46  std::shared_ptr<graphics::NativeBuffer> const& handle,
47  geometry::Rectangle const) = 0;
48 protected:
49  BufferRegistrar() = default;
50  BufferRegistrar(BufferRegistrar const&) = delete;
51  BufferRegistrar& operator=(BufferRegistrar const&) = delete;
52 };
53 
54 }
55 }
56 }
57 #endif /* MIR_CLIENT_ANDROID_BUFFER_REGISTRAR_H_ */
All things Mir.
Definition: atomic_callback.h:25
BufferRegistrar & operator=(BufferRegistrar const &)=delete
virtual std::shared_ptr< char > secure_for_cpu(std::shared_ptr< graphics::NativeBuffer > const &handle, geometry::Rectangle const)=0
Definition: mir_native_buffer.h:30
virtual std::shared_ptr< graphics::NativeBuffer > register_buffer(MirBufferPackage const &package, MirPixelFormat pf) const =0
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:134
Definition: rectangle.h:33
Definition: android_input_receiver.h:36
Definition: buffer_registrar.h:38

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015