Search for usage in LXR

#include <buffer.h>

Public Types

enum  Format { Format::ARGB32, Format::RGB32 }
typedef QWeakPointer< BufferPtr

Public Member Functions

uchar * address ()
wl_buffer * buffer () const
void copy (const void *src)
Format format () const
bool isReleased () const
bool isUsed () const
 operator wl_buffer * ()
 operator wl_buffer * () const
void setReleased (bool released)
void setUsed (bool used)
QSize size () const
int32_t stride () const

Static Public Member Functions

static quint32 getId (wl_buffer *b)

Detailed Description

Wrapper class for wl_buffer interface.

The Buffer is provided by ShmPool and is owned by ShmPool.

See also

Definition at line 30 of file buffer.h.

Member Enumeration Documentation

◆ Format

All image formats supported by the implementation.


32-bit ARGB format, can be used for QImage::Format_ARGB32 and QImage::Format_ARGB32_Premultiplied


32-bit RGB format, can be used for QImage::Format_RGB32

Definition at line 36 of file buffer.h.

Member Function Documentation

◆ address()

uchar * KWayland::Client::Buffer::address ( )
the memory address of this Buffer.

Definition at line 65 of file buffer.cpp.

◆ copy()

void KWayland::Client::Buffer::copy ( const void *  src)

Copies the data from src into the Buffer.

Definition at line 60 of file buffer.cpp.

◆ format()

Buffer::Format KWayland::Client::Buffer::format ( ) const
The image format used by this Buffer.

Definition at line 115 of file buffer.cpp.

◆ getId()

quint32 KWayland::Client::Buffer::getId ( wl_buffer *  b)

Helper method to get the id for a provided native buffer.


Definition at line 120 of file buffer.cpp.

◆ isReleased()

bool KWayland::Client::Buffer::isReleased ( ) const
true if the Wayland server doesn't need the Buffer anymore.

Definition at line 85 of file buffer.cpp.

◆ isUsed()

bool KWayland::Client::Buffer::isUsed ( ) const
true if the Buffer's user is still needing the Buffer.

Definition at line 105 of file buffer.cpp.

◆ setReleased()

void KWayland::Client::Buffer::setReleased ( bool  released)

Sets the Buffer as released.

This is automatically invoked when the Wayland server sends the release event.

releasedWhether the Buffer got released by the Wayland server.
See also

Definition at line 90 of file buffer.cpp.

◆ setUsed()

void KWayland::Client::Buffer::setUsed ( bool  used)

Sets whether the Buffer is used.

If the Buffer may not be reused when it gets released, the user of a Buffer should mark the Buffer as used. This is needed for example when the memory is shared with a QImage. As soon as the Buffer can be reused again one should call this method with false again.

By default a Buffer is not used.

usedWhether the Buffer should be marked as used.
See also

Definition at line 110 of file buffer.cpp.

◆ size()

QSize KWayland::Client::Buffer::size ( ) const
The size of this Buffer.

Definition at line 95 of file buffer.cpp.

◆ stride()

int32_t KWayland::Client::Buffer::stride ( ) const
The stride (bytes per line) of this Buffer.

Definition at line 100 of file buffer.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jun 4 2023 03:50:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.