mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
fbaccel: use the same blit-limiting hack on spark and azbox
TODO: test on other architectures, simplify code
This commit is contained in:
@@ -244,6 +244,8 @@ CFbAccel::CFbAccel(CFrameBuffer *_fb)
|
||||
bpafd = -1;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#if HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE
|
||||
OpenThreads::Thread::start();
|
||||
#endif
|
||||
|
||||
@@ -271,13 +273,15 @@ CFbAccel::CFbAccel(CFrameBuffer *_fb)
|
||||
|
||||
CFbAccel::~CFbAccel()
|
||||
{
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
#if HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE
|
||||
if (blit_thread)
|
||||
{
|
||||
blit_thread = false;
|
||||
blit(); /* wakes up the thread */
|
||||
OpenThreads::Thread::join();
|
||||
}
|
||||
#endif
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
if (backbuffer)
|
||||
{
|
||||
fprintf(stderr, "CFbAccel: unmap backbuffer\n");
|
||||
@@ -722,7 +726,6 @@ void CFbAccel::setupGXA()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
#define BLIT_INTERVAL 40
|
||||
void CFbAccel::run()
|
||||
{
|
||||
@@ -763,6 +766,7 @@ void CFbAccel::blit()
|
||||
blit_mutex.unlock();
|
||||
}
|
||||
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
void CFbAccel::_blit()
|
||||
{
|
||||
#ifdef PARTIAL_BLIT
|
||||
@@ -884,7 +888,7 @@ void CFbAccel::blit()
|
||||
|
||||
#else
|
||||
/* not azbox and not spark -> no blit() needed */
|
||||
void CFbAccel::blit()
|
||||
void CFbAccel::_blit()
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
if (glfb)
|
||||
|
@@ -36,10 +36,8 @@
|
||||
#include <vector>
|
||||
#include <OpenThreads/Mutex>
|
||||
#include <OpenThreads/ScopedLock>
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
#include <OpenThreads/Thread>
|
||||
#include <OpenThreads/Condition>
|
||||
#endif
|
||||
|
||||
#define fb_pixel_t uint32_t
|
||||
|
||||
@@ -69,9 +67,7 @@ typedef struct fb_var_screeninfo t_fb_var_screeninfo;
|
||||
|
||||
class CFrameBuffer;
|
||||
class CFbAccel
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
: public OpenThreads::Thread
|
||||
#endif
|
||||
{
|
||||
private:
|
||||
CFrameBuffer *fb;
|
||||
@@ -84,14 +80,12 @@ class CFbAccel
|
||||
void add_gxa_sync_marker(void);
|
||||
#endif /* USE_NEVIS_GXA */
|
||||
void setColor(fb_pixel_t col);
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
void run(void);
|
||||
void _blit(void);
|
||||
bool blit_thread;
|
||||
bool blit_pending;
|
||||
OpenThreads::Condition blit_cond;
|
||||
OpenThreads::Mutex blit_mutex;
|
||||
#endif
|
||||
public:
|
||||
fb_pixel_t *backbuffer;
|
||||
fb_pixel_t *lbb;
|
||||
|
Reference in New Issue
Block a user