20 #ifndef MIR_GRAPHICS_ANDROID_BUFFER_H_
21 #define MIR_GRAPHICS_ANDROID_BUFFER_H_
26 #include <hardware/gralloc.h>
29 #include <condition_variable>
32 #define GL_GLEXT_PROTOTYPES
33 #define EGL_EGLEXT_PROTOTYPES
35 #include <EGL/eglext.h>
48 Buffer(gralloc_module_t
const* hw_module,
49 std::shared_ptr<NativeBuffer>
const& buffer_handle,
50 std::shared_ptr<EGLExtensions>
const& extensions);
63 void write(
unsigned char const* pixels,
size_t size)
override;
66 gralloc_module_t
const* hw_module;
68 typedef std::pair<EGLDisplay, EGLContext> DispContextPair;
69 std::map<DispContextPair,EGLImageKHR> egl_image_map;
71 std::mutex
mutable content_lock;
72 std::shared_ptr<NativeBuffer> native_buffer;
73 std::shared_ptr<EGLExtensions> egl_extensions;
All things Mir.
Definition: buffer_stream.h:37
MirPixelFormat pixel_format() const override
Definition: buffer.cpp:67
void gl_bind_to_texture() override
Definition: buffer.cpp:78
std::shared_ptr< NativeBuffer > native_buffer_handle() const override
Definition: buffer.cpp:126
~Buffer()
Definition: buffer.cpp:45
geometry::Stride stride() const override
Definition: buffer.cpp:60
Definition: buffer_basic.h:29
Definition: android_input_receiver.h:32
geometry::Size size() const override
Definition: buffer.cpp:54
Definition: dimensions.h:38
void write(unsigned char const *pixels, size_t size) override
Definition: buffer.cpp:142
bool can_bypass() const override
Definition: buffer.cpp:73