KWin
|
#include <graphicsbuffer.h>
Classes | |
struct | Map |
Public Types | |
enum | MapFlag { Read = 0x1 , Write = 0x2 } |
Signals | |
void | released () |
Public Member Functions | |
GraphicsBuffer (QObject *parent=nullptr) | |
bool | isReferenced () const |
bool | isDropped () const |
void | ref () |
void | unref () |
void | drop () |
virtual Map | map (MapFlags flags) |
virtual void | unmap () |
virtual QSize | size () const =0 |
virtual bool | hasAlphaChannel () const =0 |
virtual const DmaBufAttributes * | dmabufAttributes () const |
virtual const ShmAttributes * | shmAttributes () const |
Static Public Member Functions | |
static bool | alphaChannelFromDrmFormat (uint32_t format) |
Protected Attributes | |
int | m_refCount = 0 |
bool | m_dropped = false |
The GraphicsBuffer class represents a chunk of memory containing graphics data.
A graphics buffer can be referenced. In which case, it won't be destroyed until all references are dropped. You can use the isDropped() function to check whether the buffer has been marked as destroyed.
Definition at line 56 of file graphicsbuffer.h.
Enumerator | |
---|---|
Read | |
Write |
Definition at line 70 of file graphicsbuffer.h.
|
explicit |
Definition at line 15 of file graphicsbuffer.cpp.
|
static |
Definition at line 76 of file graphicsbuffer.cpp.
|
virtual |
Reimplemented in KWin::GbmGraphicsBuffer, KWin::DumbGraphicsBuffer, and KWin::LinuxDmaBufV1ClientBuffer.
Definition at line 66 of file graphicsbuffer.cpp.
void KWin::GraphicsBuffer::drop | ( | ) |
Definition at line 48 of file graphicsbuffer.cpp.
|
pure virtual |
bool KWin::GraphicsBuffer::isDropped | ( | ) | const |
Definition at line 25 of file graphicsbuffer.cpp.
bool KWin::GraphicsBuffer::isReferenced | ( | ) | const |
Definition at line 20 of file graphicsbuffer.cpp.
|
virtual |
Reimplemented in KWin::GbmGraphicsBuffer, KWin::DumbGraphicsBuffer, KWin::ShmGraphicsBuffer, and KWin::ShmClientBuffer.
Definition at line 57 of file graphicsbuffer.cpp.
void KWin::GraphicsBuffer::ref | ( | ) |
Definition at line 30 of file graphicsbuffer.cpp.
|
signal |
|
virtual |
Reimplemented in KWin::ShmGraphicsBuffer, and KWin::ShmClientBuffer.
Definition at line 71 of file graphicsbuffer.cpp.
|
pure virtual |
|
virtual |
Reimplemented in KWin::GbmGraphicsBuffer, KWin::DumbGraphicsBuffer, KWin::ShmGraphicsBuffer, and KWin::ShmClientBuffer.
Definition at line 62 of file graphicsbuffer.cpp.
void KWin::GraphicsBuffer::unref | ( | ) |
Definition at line 35 of file graphicsbuffer.cpp.
|
protected |
Definition at line 97 of file graphicsbuffer.h.
|
protected |
Definition at line 96 of file graphicsbuffer.h.