KWin
Loading...
Searching...
No Matches
Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
KWin::GraphicsBuffer Class Referenceabstract

#include <graphicsbuffer.h>

Inheritance diagram for KWin::GraphicsBuffer:
KWin::DumbGraphicsBuffer KWin::GbmGraphicsBuffer KWin::LinuxDmaBufV1ClientBuffer KWin::ShmClientBuffer KWin::ShmGraphicsBuffer

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 DmaBufAttributesdmabufAttributes () const
 
virtual const ShmAttributesshmAttributes () const
 

Static Public Member Functions

static bool alphaChannelFromDrmFormat (uint32_t format)
 

Protected Attributes

int m_refCount = 0
 
bool m_dropped = false
 

Detailed Description

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.

Member Enumeration Documentation

◆ MapFlag

Enumerator
Read 
Write 

Definition at line 70 of file graphicsbuffer.h.

Constructor & Destructor Documentation

◆ GraphicsBuffer()

KWin::GraphicsBuffer::GraphicsBuffer ( QObject * parent = nullptr)
explicit

Definition at line 15 of file graphicsbuffer.cpp.

Member Function Documentation

◆ alphaChannelFromDrmFormat()

bool KWin::GraphicsBuffer::alphaChannelFromDrmFormat ( uint32_t format)
static

Definition at line 76 of file graphicsbuffer.cpp.

◆ dmabufAttributes()

const DmaBufAttributes * KWin::GraphicsBuffer::dmabufAttributes ( ) const
virtual

◆ drop()

void KWin::GraphicsBuffer::drop ( )

Definition at line 48 of file graphicsbuffer.cpp.

◆ hasAlphaChannel()

virtual bool KWin::GraphicsBuffer::hasAlphaChannel ( ) const
pure virtual

◆ isDropped()

bool KWin::GraphicsBuffer::isDropped ( ) const

Definition at line 25 of file graphicsbuffer.cpp.

◆ isReferenced()

bool KWin::GraphicsBuffer::isReferenced ( ) const

Definition at line 20 of file graphicsbuffer.cpp.

◆ map()

GraphicsBuffer::Map KWin::GraphicsBuffer::map ( MapFlags flags)
virtual

◆ ref()

void KWin::GraphicsBuffer::ref ( )

Definition at line 30 of file graphicsbuffer.cpp.

◆ released

void KWin::GraphicsBuffer::released ( )
signal

◆ shmAttributes()

const ShmAttributes * KWin::GraphicsBuffer::shmAttributes ( ) const
virtual

Reimplemented in KWin::ShmGraphicsBuffer, and KWin::ShmClientBuffer.

Definition at line 71 of file graphicsbuffer.cpp.

◆ size()

virtual QSize KWin::GraphicsBuffer::size ( ) const
pure virtual

◆ unmap()

void KWin::GraphicsBuffer::unmap ( )
virtual

◆ unref()

void KWin::GraphicsBuffer::unref ( )

Definition at line 35 of file graphicsbuffer.cpp.

Member Data Documentation

◆ m_dropped

bool KWin::GraphicsBuffer::m_dropped = false
protected

Definition at line 97 of file graphicsbuffer.h.

◆ m_refCount

int KWin::GraphicsBuffer::m_refCount = 0
protected

Definition at line 96 of file graphicsbuffer.h.


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