KWin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KWin::DamageJournal Class Reference

#include <damagejournal.h>

Public Member Functions

int capacity () const
 
void setCapacity (int capacity)
 
void add (const QRegion &region)
 
void clear ()
 
QRegion accumulate (int bufferAge, const QRegion &fallback=QRegion()) const
 
QRegion lastDamage () const
 

Detailed Description

The DamageJournal class is a helper that tracks last N damage regions.

Definition at line 20 of file damagejournal.h.

Member Function Documentation

◆ accumulate()

QRegion KWin::DamageJournal::accumulate ( int bufferAge,
const QRegion & fallback = QRegion() ) const
inline

Accumulates the damage regions in the log up to the specified bufferAge.

If the specified buffer age value refers to a damage region older than the last one in the journal, fallback will be returned.

Definition at line 66 of file damagejournal.h.

◆ add()

void KWin::DamageJournal::add ( const QRegion & region)
inline

Adds the specified region to the journal.

Definition at line 43 of file damagejournal.h.

◆ capacity()

int KWin::DamageJournal::capacity ( ) const
inline

Returns the maximum number of damage regions that can be stored in the journal.

Definition at line 26 of file damagejournal.h.

◆ clear()

void KWin::DamageJournal::clear ( )
inline

Clears the damage journal. Typically, one would want to clear the damage journal if a buffer swap fails for some reason.

Definition at line 55 of file damagejournal.h.

◆ lastDamage()

QRegion KWin::DamageJournal::lastDamage ( ) const
inline

Definition at line 79 of file damagejournal.h.

◆ setCapacity()

void KWin::DamageJournal::setCapacity ( int capacity)
inline

Sets the maximum number of damage regions that can be stored in the journal to capacity.

Definition at line 35 of file damagejournal.h.


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