Beatmup
Beatmup::AbstractBitmap::WriteLock< target > Class Template Reference

Makes a bitmap writable for a specific target device. More...

#include <abstract_bitmap.h>

Public Member Functions

 WriteLock (AbstractBitmap &bitmap)
 
 ~WriteLock ()
 

Private Attributes

AbstractBitmapbitmap
 

Detailed Description

template<ProcessingTarget target>
class Beatmup::AbstractBitmap::WriteLock< target >

Makes a bitmap writable for a specific target device.

Once instantiated on a bitmap, bitmap.getData() returns valid address. When destroyed, marks the bitmap being up-to-date in RAM and outdated in GPU memory. This lock may be used within tasks.

Definition at line 252 of file abstract_bitmap.h.

Constructor & Destructor Documentation

◆ WriteLock()

template<ProcessingTarget target>
Beatmup::AbstractBitmap::WriteLock< target >::WriteLock ( AbstractBitmap bitmap)
inline

Definition at line 256 of file abstract_bitmap.h.

256  : bitmap(bitmap) {
257  if (target == ProcessingTarget::CPU)
259  }
virtual void lockPixelData()=0
Locks access to the CPU memory buffer containing pixel data.

◆ ~WriteLock()

template<ProcessingTarget target>
Beatmup::AbstractBitmap::WriteLock< target >::~WriteLock ( )
inline

Definition at line 261 of file abstract_bitmap.h.

261  {
264  if (target == ProcessingTarget::CPU)
266  }
virtual void unlockPixelData()=0
Unlocks access to the CPU memory buffer containing pixel data.
bool upToDate[2]
bitmap up-to-date state on CPU and GPU

Member Data Documentation

◆ bitmap

template<ProcessingTarget target>
AbstractBitmap& Beatmup::AbstractBitmap::WriteLock< target >::bitmap
private

Definition at line 254 of file abstract_bitmap.h.


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