aboutsummaryrefslogtreecommitdiff
path: root/lib/gdi/accel.cpp
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2009-06-03 18:28:38 +0200
committerFelix Domke <tmbinc@elitedvb.net>2009-06-03 18:28:38 +0200
commitecc23dd3be5128650082a594b7e2939922d7462c (patch)
tree123bdd9b8ae8f1c4443d77cda29931e717b97e08 /lib/gdi/accel.cpp
parent48990707ae3c60707752d3ab5c98e33d49caee9c (diff)
downloadenigma2-ecc23dd3be5128650082a594b7e2939922d7462c.tar.gz
enigma2-ecc23dd3be5128650082a594b7e2939922d7462c.zip
add bcm accel
Diffstat (limited to 'lib/gdi/accel.cpp')
-rw-r--r--lib/gdi/accel.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/gdi/accel.cpp b/lib/gdi/accel.cpp
index f1ffe193..bf9a5a44 100644
--- a/lib/gdi/accel.cpp
+++ b/lib/gdi/accel.cpp
@@ -9,7 +9,7 @@
#include <lib/gdi/gpixmap.h>
gAccel *gAccel::instance;
-// #define BCM_ACCEL
+#define BCM_ACCEL
#ifdef ATI_ACCEL
extern int ati_accel_init(void);
@@ -50,7 +50,7 @@ gAccel::gAccel()
ati_accel_init();
#endif
#ifdef BCM_ACCEL
- bcm_accel_init();
+ m_bcm_accel_state = bcm_accel_init();
#endif
}
@@ -95,12 +95,15 @@ int gAccel::blit(gSurface *dst, const gSurface *src, const eRect &p, const eRect
return 0;
#endif
#ifdef BCM_ACCEL
- bcm_accel_blit(
- src->data_phys, src->x, src->y, src->stride,
- dst->data_phys, dst->x, dst->y, dst->stride,
- area.left(), area.top(), area.width(), area.height(),
- p.x(), p.y(), p.width(), p.height());
- return 0;
+ if (!m_bcm_accel_state)
+ {
+ bcm_accel_blit(
+ src->data_phys, src->x, src->y, src->stride,
+ dst->data_phys, dst->x, dst->y, dst->stride,
+ area.left(), area.top(), area.width(), area.height(),
+ p.x(), p.y(), p.width(), p.height());
+ return 0;
+ }
#endif
return -1;
}