[common] rects: implement routine to copy rectangles from framebuffer

This commit is contained in:
Quantum
2021-08-06 23:58:26 -04:00
committed by Geoffrey McRae
parent cab95c5eed
commit 0462cee9db
4 changed files with 41 additions and 1 deletions

View File

@@ -61,6 +61,12 @@ void framebuffer_prepare(FrameBuffer * frame);
*/
bool framebuffer_write(FrameBuffer * frame, const void * src, size_t size);
/**
* Gets the underlying data buffer of the framebuffer.
* For custom read routines only.
*/
const uint8_t * framebuffer_get_buffer(const FrameBuffer * frame);
/**
* Gets the underlying data buffer of the framebuffer.
* For custom write routines only.

View File

@@ -42,4 +42,8 @@ void rectsBufferToFramebuffer(FrameDamageRect * rects, int count,
FrameBuffer * frame, int dstStride, int height,
const uint8_t * src, int srcStride);
void rectsFramebufferToBuffer(FrameDamageRect * rects, int count,
uint8_t * dst, int dstStride, int height,
const FrameBuffer * frame, int srcStride);
#endif