20 #ifndef MIR_GRAPHICS_ANDROID_BUFFER_H_
21 #define MIR_GRAPHICS_ANDROID_BUFFER_H_
27 #include <condition_variable>
30 #define GL_GLEXT_PROTOTYPES
31 #define EGL_EGLEXT_PROTOTYPES
33 #include <EGL/eglext.h>
43 class Buffer:
public BufferBasic
46 Buffer(std::shared_ptr<NativeBuffer>
const& buffer_handle,
47 std::shared_ptr<EGLExtensions>
const& extensions);
50 geometry::Size
size()
const;
53 void bind_to_texture();
54 bool can_bypass()
const override;
58 std::shared_ptr<NativeBuffer> native_buffer_handle()
const;
61 std::mutex
mutable content_lock;
63 std::map<EGLDisplay,EGLImageKHR> egl_image_map;
65 std::shared_ptr<NativeBuffer> native_buffer;
66 std::shared_ptr<EGLExtensions> egl_extensions;