21 #include <initializer_list>
25 class GraphicPipeline;
45 std::map<AbstractBitmap*, LockDescriptor>
bitmaps;
83 template <const ProcessingTarget target>
94 template <const ProcessingTarget target>
96 for (
auto bmp :
write)
102 template<
typename ... Args>
A very basic class for any image.
Makes sure the bitmap content is accessible within an image processing task.
void unlock(AbstractBitmap *bitmap)
Drops a lock to the bitmap.
void lock(GraphicPipeline *gpu, AbstractBitmap *input, AbstractBitmap *output)
BitmapContentLock(const BitmapContentLock &)=delete
std::map< AbstractBitmap *, LockDescriptor > bitmaps
void readLock(GraphicPipeline *gpu, AbstractBitmap *bitmap, ProcessingTarget target)
Locks content of a bitmap for reading using a specific processing target device.
void unlock(AbstractBitmap *first, Args ... others)
void lock(GraphicPipeline *gpu, ProcessingTarget target, AbstractBitmap *input, AbstractBitmap *output)
void lock(GraphicPipeline *gpu, std::initializer_list< AbstractBitmap * > read, std::initializer_list< AbstractBitmap * > write)
void writeLock(GraphicPipeline *gpu, AbstractBitmap *bitmap, ProcessingTarget target)
Locks content of a bitmap for writing using a specific processing target device.
void unlockAll()
Unlocks all the locked bitmaps unconditionally.
Internal low-level GPU control API.
void write(Bitmap &bitmap, Args &&... args)
Calls a Func< WriterClass >::process(access, params) that writes to a bitmap of any kind,...
void read(Bitmap &bitmap, Args &&... args)
Calls a Func< ReaderClass >::process(access, params), where.
bool isDataLocked
if true, the bitmap pixel data is locked in RAM
int refs
number of times the bitmap is locked
Beatmup::InternalBitmap * bitmap