fbaccel: implement partial blitting for SPARK

Blit only the parts of the screen that have changed. First
tests show better performance and no obvious errors. Might
still contain some bugs, you have been warned :-)
This commit is contained in:
Stefan Seyfried
2015-02-08 21:47:20 +01:00
parent 5fa8552fa6
commit d1573a510e
3 changed files with 51 additions and 8 deletions

View File

@@ -36,6 +36,10 @@
#include <OpenThreads/Thread>
#include <OpenThreads/Condition>
#if HAVE_SPARK_HARDWARE
#define PARTIAL_BLIT 1
#endif
class CFrameBuffer;
class CFbAccel
: public OpenThreads::Thread
@@ -57,6 +61,16 @@ class CFbAccel
bool blit_pending;
OpenThreads::Condition blit_cond;
OpenThreads::Mutex blit_mutex;
#ifdef PARTIAL_BLIT
OpenThreads::Mutex to_blit_mutex;
struct {
int xs;
int ys;
int xe;
int ye;
} to_blit;
uint32_t last_xres;
#endif
public:
fb_pixel_t *backbuffer;
fb_pixel_t *lbb;