tinydisplay: Implement resizeability of offscreen buffers

Fixes #1322
This commit is contained in:
rdb 2022-06-29 17:03:44 +02:00
parent 5493a0d5fc
commit 3fc579c7d4
2 changed files with 11 additions and 0 deletions

View File

@ -89,6 +89,15 @@ end_frame(FrameMode mode, Thread *current_thread) {
}
}
/**
*
*/
void TinyGraphicsBuffer::
set_size(int x, int y) {
GraphicsBuffer::set_size(x, y);
create_frame_buffer();
}
/**
* Closes the buffer right now. Called from the buffer thread.
*/

View File

@ -35,6 +35,8 @@ public:
virtual bool begin_frame(FrameMode mode, Thread *current_thread);
virtual void end_frame(FrameMode mode, Thread *current_thread);
virtual void set_size(int x, int y);
INLINE ZBuffer *get_frame_buffer();
protected: