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;
|
bpafd = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE
|
||||||
OpenThreads::Thread::start();
|
OpenThreads::Thread::start();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -271,13 +273,15 @@ CFbAccel::CFbAccel(CFrameBuffer *_fb)
|
|||||||
|
|
||||||
CFbAccel::~CFbAccel()
|
CFbAccel::~CFbAccel()
|
||||||
{
|
{
|
||||||
#if HAVE_SPARK_HARDWARE
|
#if HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE
|
||||||
if (blit_thread)
|
if (blit_thread)
|
||||||
{
|
{
|
||||||
blit_thread = false;
|
blit_thread = false;
|
||||||
blit(); /* wakes up the thread */
|
blit(); /* wakes up the thread */
|
||||||
OpenThreads::Thread::join();
|
OpenThreads::Thread::join();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if HAVE_SPARK_HARDWARE
|
||||||
if (backbuffer)
|
if (backbuffer)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "CFbAccel: unmap backbuffer\n");
|
fprintf(stderr, "CFbAccel: unmap backbuffer\n");
|
||||||
@@ -722,7 +726,6 @@ void CFbAccel::setupGXA()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SPARK_HARDWARE
|
|
||||||
#define BLIT_INTERVAL 40
|
#define BLIT_INTERVAL 40
|
||||||
void CFbAccel::run()
|
void CFbAccel::run()
|
||||||
{
|
{
|
||||||
@@ -763,6 +766,7 @@ void CFbAccel::blit()
|
|||||||
blit_mutex.unlock();
|
blit_mutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_SPARK_HARDWARE
|
||||||
void CFbAccel::_blit()
|
void CFbAccel::_blit()
|
||||||
{
|
{
|
||||||
#ifdef PARTIAL_BLIT
|
#ifdef PARTIAL_BLIT
|
||||||
@@ -884,7 +888,7 @@ void CFbAccel::blit()
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
/* not azbox and not spark -> no blit() needed */
|
/* not azbox and not spark -> no blit() needed */
|
||||||
void CFbAccel::blit()
|
void CFbAccel::_blit()
|
||||||
{
|
{
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
if (glfb)
|
if (glfb)
|
||||||
|
@@ -36,10 +36,8 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <OpenThreads/Mutex>
|
#include <OpenThreads/Mutex>
|
||||||
#include <OpenThreads/ScopedLock>
|
#include <OpenThreads/ScopedLock>
|
||||||
#if HAVE_SPARK_HARDWARE
|
|
||||||
#include <OpenThreads/Thread>
|
#include <OpenThreads/Thread>
|
||||||
#include <OpenThreads/Condition>
|
#include <OpenThreads/Condition>
|
||||||
#endif
|
|
||||||
|
|
||||||
#define fb_pixel_t uint32_t
|
#define fb_pixel_t uint32_t
|
||||||
|
|
||||||
@@ -69,9 +67,7 @@ typedef struct fb_var_screeninfo t_fb_var_screeninfo;
|
|||||||
|
|
||||||
class CFrameBuffer;
|
class CFrameBuffer;
|
||||||
class CFbAccel
|
class CFbAccel
|
||||||
#if HAVE_SPARK_HARDWARE
|
|
||||||
: public OpenThreads::Thread
|
: public OpenThreads::Thread
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CFrameBuffer *fb;
|
CFrameBuffer *fb;
|
||||||
@@ -84,14 +80,12 @@ class CFbAccel
|
|||||||
void add_gxa_sync_marker(void);
|
void add_gxa_sync_marker(void);
|
||||||
#endif /* USE_NEVIS_GXA */
|
#endif /* USE_NEVIS_GXA */
|
||||||
void setColor(fb_pixel_t col);
|
void setColor(fb_pixel_t col);
|
||||||
#if HAVE_SPARK_HARDWARE
|
|
||||||
void run(void);
|
void run(void);
|
||||||
void _blit(void);
|
void _blit(void);
|
||||||
bool blit_thread;
|
bool blit_thread;
|
||||||
bool blit_pending;
|
bool blit_pending;
|
||||||
OpenThreads::Condition blit_cond;
|
OpenThreads::Condition blit_cond;
|
||||||
OpenThreads::Mutex blit_mutex;
|
OpenThreads::Mutex blit_mutex;
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
fb_pixel_t *backbuffer;
|
fb_pixel_t *backbuffer;
|
||||||
fb_pixel_t *lbb;
|
fb_pixel_t *lbb;
|
||||||
|
Reference in New Issue
Block a user