[common] framebuffer: allow custom framebuffer write implementations

This is helpful for only copying damaged areas.
This commit is contained in:
Quantum authored and Geoffrey McRae committed 2021-07-18 10:41:50 +10:00
1 parent 9ce4990793
commit ef2da1902e
2 files changed
+22

No files matched your search

+10
View File
@@ -213,3 +213,13 @@ bool framebuffer_write(FrameBuffer * frame, const void * restrict src, size_t si
return true;
}
uint8_t * framebuffer_get_data(FrameBuffer * frame)
{
return frame->data;
}
void framebuffer_set_write_ptr(FrameBuffer * frame, size_t size)
{
atomic_store_explicit(&frame->wp, size, memory_order_release);
}