Mir
Public Member Functions | List of all members
WaylandShmBuffer Class Reference

#include <wayland_shm.h>

Inheritance diagram for WaylandShmBuffer:
[legend]

Public Member Functions

 WaylandShmBuffer (std::shared_ptr< WaylandShmPool > pool, void *data, mir::geometry::Size size, mir::geometry::Stride stride, wl_buffer *buffer)
 
 ~WaylandShmBuffer ()
 
auto data () const -> void *
 
auto size () const -> mir::geometry::Size
 
auto stride () const -> mir::geometry::Stride
 
auto is_in_use () const -> bool
 Returns if this buffer is currently being used by the compositor. In-use buffers keep themselves alive. More...
 
auto use () -> wl_buffer *
 Marks this buffer as in-use and assumes the resulting wl_buffer is sent to the compositor. Keeps this buffer alive until the compositor releases it (if it's not sent to the compositor or the compositor never releases it this buffer is leaked). Should only be called if the buffer is not already in-use. More...
 

Constructor & Destructor Documentation

◆ WaylandShmBuffer()

WaylandShmBuffer::WaylandShmBuffer ( std::shared_ptr< WaylandShmPool >  pool,
void *  data,
mir::geometry::Size  size,
mir::geometry::Stride  stride,
wl_buffer *  buffer 
)

◆ ~WaylandShmBuffer()

WaylandShmBuffer::~WaylandShmBuffer ( )

Member Function Documentation

◆ data()

auto WaylandShmBuffer::data ( ) const -> void*
inline

◆ is_in_use()

auto WaylandShmBuffer::is_in_use ( ) const -> bool
inline

Returns if this buffer is currently being used by the compositor. In-use buffers keep themselves alive.

◆ size()

auto WaylandShmBuffer::size ( ) const -> mir::geometry::Size
inline

◆ stride()

auto WaylandShmBuffer::stride ( ) const -> mir::geometry::Stride
inline

◆ use()

auto WaylandShmBuffer::use ( ) -> wl_buffer*

Marks this buffer as in-use and assumes the resulting wl_buffer is sent to the compositor. Keeps this buffer alive until the compositor releases it (if it's not sent to the compositor or the compositor never releases it this buffer is leaked). Should only be called if the buffer is not already in-use.


The documentation for this class was generated from the following files:

Copyright © 2012-2023 Canonical Ltd.
Generated on Tue 2 May 10:01:24 UTC 2023
This documentation is licensed under the GPL version 2 or 3.