diff --git a/src/driver/fb_accel.h b/src/driver/fb_accel.h index 49ec2b296..4a897930c 100644 --- a/src/driver/fb_accel.h +++ b/src/driver/fb_accel.h @@ -213,9 +213,15 @@ class CFbAccelTD }; class CFbAccelARM +#if ENABLE_ARM_ACC : public OpenThreads::Thread, public CFbAccel +#else + : public CFbAccel +#endif + { private: +#if ENABLE_ARM_ACC void run(void); void blit(void); void _blit(void); @@ -223,6 +229,7 @@ class CFbAccelARM bool blit_pending; OpenThreads::Condition blit_cond; OpenThreads::Mutex blit_mutex; +#endif fb_pixel_t *backbuffer; public: CFbAccelARM(); @@ -238,9 +245,14 @@ class CFbAccelARM }; class CFbAccelMIPS +#if ENABLE_MIPS_ACC : public OpenThreads::Thread, public CFbAccel +#else + : public CFbAccel +#endif { private: +#if ENABLE_MIPS_ACC void run(void); void blit(void); void _blit(void); @@ -248,6 +260,7 @@ class CFbAccelMIPS bool blit_pending; OpenThreads::Condition blit_cond; OpenThreads::Mutex blit_mutex; +#endif fb_pixel_t *backbuffer; public: CFbAccelMIPS(); diff --git a/src/driver/fb_accel_arm.cpp b/src/driver/fb_accel_arm.cpp index 06cd00d0d..f249db4d9 100644 --- a/src/driver/fb_accel_arm.cpp +++ b/src/driver/fb_accel_arm.cpp @@ -39,13 +39,18 @@ #include +#if ENABLE_ARM_ACC #include +#endif + #include #include #define LOGTAG "[fb_accel_arm] " +#if ENABLE_ARM_ACC #define FBIO_BLIT 0x22 +#endif #define FBIO_ACCEL 0x23 static unsigned int displaylist[1024]; @@ -58,6 +63,7 @@ static bool supportblendingflags = true; static int fb_fd = -1; static int exec_list(void); +#if ENABLE_ARM_ACC static bool accumulateoperations = false; bool bcm_accel_has_alphablending() @@ -223,6 +229,7 @@ void bcm_accel_fill( if (!accumulateoperations) exec_list(); } +#endif static int exec_list(void) { @@ -244,7 +251,9 @@ static int exec_list(void) CFbAccelARM::CFbAccelARM() { +#if ENABLE_ARM_ACC blit_thread = false; +#endif fb_name = "armbox framebuffer"; fb_fd = open(FB_DEVICE, O_RDWR); if (fb_fd < 0) @@ -267,18 +276,21 @@ CFbAccelARM::CFbAccelARM() /* hardware doesn't allow us to detect whether the opcode is working */ supportblendingflags = false; #endif +#if ENABLE_ARM_ACC OpenThreads::Thread::start(); +#endif } CFbAccelARM::~CFbAccelARM() { +#if ENABLE_ARM_ACC if (blit_thread) { blit_thread = false; blit(); /* wakes up the thread */ OpenThreads::Thread::join(); } - +#endif if (fb_fd >= 0) { close(fb_fd); @@ -397,6 +409,7 @@ bool CFbAccelARM::fullHdAvailable() return false; } +#if ENABLE_ARM_ACC #define BLIT_INTERVAL_MIN 40 #define BLIT_INTERVAL_MAX 250 void CFbAccelARM::run() @@ -442,7 +455,6 @@ void CFbAccelARM::_blit() printf("FBIO_BLIT"); } -#if ENABLE_ARM_ACC void CFbAccelARM::paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col) { if(dx <1 || dy <1 ) diff --git a/src/driver/fb_accel_mips.cpp b/src/driver/fb_accel_mips.cpp index d2800f896..7abfd93d2 100644 --- a/src/driver/fb_accel_mips.cpp +++ b/src/driver/fb_accel_mips.cpp @@ -39,13 +39,18 @@ #include +#if ENABLE_MIPS_ACC #include +#endif + #include #include #define LOGTAG "[fb_accel_mips] " +#if ENABLE_MIPS_ACC #define FBIO_BLIT 0x22 +#endif #define FBIO_ACCEL 0x23 static unsigned int displaylist[1024]; @@ -58,6 +63,7 @@ static bool supportblendingflags = true; static int fb_fd = -1; static int exec_list(void); +#if ENABLE_MIPS_ACC static bool accumulateoperations = false; bool bcm_accel_has_alphablending() @@ -223,6 +229,7 @@ void bcm_accel_fill( if (!accumulateoperations) exec_list(); } +#endif static int exec_list(void) { @@ -244,7 +251,9 @@ static int exec_list(void) CFbAccelMIPS::CFbAccelMIPS() { +#if ENABLE_MIPS_ACC blit_thread = false; +#endif fb_name = "mipsbox framebuffer"; fb_fd = open(FB_DEVICE, O_RDWR); if (fb_fd < 0) @@ -268,18 +277,21 @@ CFbAccelMIPS::CFbAccelMIPS() /* hardware doesn't allow us to detect whether the opcode is working */ supportblendingflags = false; #endif +#if ENABLE_MIPS_ACC OpenThreads::Thread::start(); +#endif } CFbAccelMIPS::~CFbAccelMIPS() { +#if ENABLE_MIPS_ACC if (blit_thread) { blit_thread = false; blit(); /* wakes up the thread */ OpenThreads::Thread::join(); } - +#endif if (fb_fd >= 0) { close(fb_fd); @@ -398,6 +410,7 @@ bool CFbAccelMIPS::fullHdAvailable() return false; } +#if ENABLE_MIPS_ACC #define BLIT_INTERVAL_MIN 40 #define BLIT_INTERVAL_MAX 250 void CFbAccelMIPS::run() @@ -443,7 +456,6 @@ void CFbAccelMIPS::_blit() printf("FBIO_BLIT"); } -#if ENABLE_MIPS_ACC void CFbAccelMIPS::paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col) { if(dx <1 || dy <1 )