fb_accel: Rename CFbAccelCSApollo class => CFbAccelCSHD2

Rename fb_accel_cs_apollo.cpp => fb_accel_cs_hd2.cpp
This commit is contained in:
M. Liebmann
2017-02-08 12:33:45 +01:00
parent 58bd8a4a63
commit a4afe1e8e0
4 changed files with 22 additions and 21 deletions

View File

@@ -48,7 +48,7 @@ libneutrino_driver_a_SOURCES = \
if BOXTYPE_COOL if BOXTYPE_COOL
if BOXMODEL_APOLLO if BOXMODEL_APOLLO
libneutrino_driver_a_SOURCES += \ libneutrino_driver_a_SOURCES += \
fb_accel_cs_apollo.cpp \ fb_accel_cs_hd2.cpp \
vfd.cpp vfd.cpp
else else
libneutrino_driver_a_SOURCES += \ libneutrino_driver_a_SOURCES += \

View File

@@ -110,15 +110,15 @@ class CFbAccelCSHD1
void setupGXA(void); void setupGXA(void);
}; };
class CFbAccelCSApollo class CFbAccelCSHD2
: public CFbAccel : public CFbAccel
{ {
private: private:
fb_pixel_t *backbuffer; fb_pixel_t *backbuffer;
public: public:
CFbAccelCSApollo(); CFbAccelCSHD2();
// ~CFbAccelCSApollo(); // ~CFbAccelCSHD2();
int setMode(unsigned int xRes, unsigned int yRes, unsigned int bpp); int setMode(unsigned int xRes, unsigned int yRes, unsigned int bpp);
void paintHLineRel(int x, int dx, int y, const fb_pixel_t col); void paintHLineRel(int x, int dx, int y, const fb_pixel_t col);
void paintVLineRel(int x, int y, int dy, const fb_pixel_t col); void paintVLineRel(int x, int y, int dy, const fb_pixel_t col);

View File

@@ -45,18 +45,18 @@
#define LOGTAG "[fb_accel_apollo] " #define LOGTAG "[fb_accel_apollo] "
CFbAccelCSApollo::CFbAccelCSApollo() CFbAccelCSHD2::CFbAccelCSHD2()
{ {
fb_name = "Coolstream APOLLO framebuffer"; fb_name = "Coolstream APOLLO framebuffer";
} }
/* /*
CFbAccelCSApollo::~CFbAccelCSApollo() CFbAccelCSHD2::~CFbAccelCSHD2()
{ {
} }
*/ */
void CFbAccelCSApollo::paintHLineRel(int x, int dx, int y, const fb_pixel_t col) void CFbAccelCSHD2::paintHLineRel(int x, int dx, int y, const fb_pixel_t col)
{ {
if (!getActive()) if (!getActive())
return; return;
@@ -75,7 +75,7 @@ void CFbAccelCSApollo::paintHLineRel(int x, int dx, int y, const fb_pixel_t col)
CFrameBuffer::paintHLineRelInternal(x, dx, y, col); CFrameBuffer::paintHLineRelInternal(x, dx, y, col);
} }
void CFbAccelCSApollo::paintVLineRel(int x, int y, int dy, const fb_pixel_t col) void CFbAccelCSHD2::paintVLineRel(int x, int y, int dy, const fb_pixel_t col)
{ {
if (!getActive()) if (!getActive())
return; return;
@@ -90,17 +90,17 @@ void CFbAccelCSApollo::paintVLineRel(int x, int y, int dy, const fb_pixel_t col)
ioctl(fd, FBIO_FILL_RECT, &fillrect); ioctl(fd, FBIO_FILL_RECT, &fillrect);
} }
void CFbAccelCSApollo::paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius, int type) void CFbAccelCSHD2::paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius, int type)
{ {
if (!getActive()) if (!getActive())
return; return;
if (dx == 0 || dy == 0) { if (dx == 0 || dy == 0) {
dprintf(DEBUG_DEBUG, "[CFbAccelCSApollo] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx, y+dy); dprintf(DEBUG_DEBUG, "[CFbAccelCSHD2] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx, y+dy);
return; return;
} }
if (radius < 0) if (radius < 0)
dprintf(DEBUG_NORMAL, "[CFbAccelCSApollo] [%s - %d]: WARNING! radius < 0 [%d] FIXME\n", __func__, __LINE__, radius); dprintf(DEBUG_NORMAL, "[CFbAccelCSHD2] [%s - %d]: WARNING! radius < 0 [%d] FIXME\n", __func__, __LINE__, radius);
checkFbArea(x, y, dx, dy, true); checkFbArea(x, y, dx, dy, true);
@@ -129,9 +129,9 @@ void CFbAccelCSApollo::paintBoxRel(const int x, const int y, const int dx, const
if (dx-ofr-ofl < 1) { if (dx-ofr-ofl < 1) {
if (dx-ofr-ofl == 0){ if (dx-ofr-ofl == 0){
dprintf(DEBUG_INFO, "[CFbAccelCSApollo] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx-ofr-ofl, y+line); dprintf(DEBUG_INFO, "[CFbAccelCSHD2] [%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __func__, __LINE__, radius, x, y, x+dx-ofr-ofl, y+line);
}else{ }else{
dprintf(DEBUG_INFO, "[CFbAccelCSApollo] [%s - %04d]: Calculated width: %d\n (radius %d, dx %d, offsetLeft %d, offsetRight %d).\n Width can not be less than 0, abort.\n", dprintf(DEBUG_INFO, "[CFbAccelCSHD2] [%s - %04d]: Calculated width: %d\n (radius %d, dx %d, offsetLeft %d, offsetRight %d).\n Width can not be less than 0, abort.\n",
__func__, __LINE__, dx-ofr-ofl, radius, dx, ofl, ofr); __func__, __LINE__, dx-ofr-ofl, radius, dx, ofl, ofr);
} }
line++; line++;
@@ -160,7 +160,7 @@ void CFbAccelCSApollo::paintBoxRel(const int x, const int y, const int dx, const
checkFbArea(x, y, dx, dy, false); checkFbArea(x, y, dx, dy, false);
} }
void CFbAccelCSApollo::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp) void CFbAccelCSHD2::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
{ {
int xc, yc; int xc, yc;
xc = (width > xRes) ? xRes : width; xc = (width > xRes) ? xRes : width;
@@ -181,7 +181,7 @@ void CFbAccelCSApollo::blit2FB(void *fbbuff, uint32_t width, uint32_t height, ui
CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp); CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp);
} }
void CFbAccelCSApollo::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff) void CFbAccelCSHD2::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff)
{ {
if(width <1 || height <1 || !boxBuf ) if(width <1 || height <1 || !boxBuf )
return; return;
@@ -204,7 +204,7 @@ void CFbAccelCSApollo::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint
CFrameBuffer::blitBox2FB(boxBuf, width, height, xoff, yoff); CFrameBuffer::blitBox2FB(boxBuf, width, height, xoff, yoff);
} }
int CFbAccelCSApollo::setMode(unsigned int, unsigned int, unsigned int) int CFbAccelCSHD2::setMode(unsigned int, unsigned int, unsigned int)
{ {
fb_fix_screeninfo _fix; fb_fix_screeninfo _fix;
@@ -230,13 +230,13 @@ int CFbAccelCSApollo::setMode(unsigned int, unsigned int, unsigned int)
return 0; /* dont fail because of this */ return 0; /* dont fail because of this */
} }
void CFbAccelCSApollo::setBlendMode(uint8_t mode) void CFbAccelCSHD2::setBlendMode(uint8_t mode)
{ {
if (ioctl(fd, FBIO_SETBLENDMODE, mode)) if (ioctl(fd, FBIO_SETBLENDMODE, mode))
printf("FBIO_SETBLENDMODE failed.\n"); printf("FBIO_SETBLENDMODE failed.\n");
} }
void CFbAccelCSApollo::setBlendLevel(int level) void CFbAccelCSHD2::setBlendLevel(int level)
{ {
unsigned char value = 0xFF; unsigned char value = 0xFF;
if (level >= 0 && level <= 100) if (level >= 0 && level <= 100)

View File

@@ -124,11 +124,12 @@ CFrameBuffer* CFrameBuffer::getInstance()
frameBuffer = new CFbAccelSTi(); frameBuffer = new CFbAccelSTi();
#endif #endif
#if HAVE_COOL_HARDWARE #if HAVE_COOL_HARDWARE
#ifdef BOXMODEL_APOLLO #ifdef BOXMODEL_NEVIS
frameBuffer = new CFbAccelCSApollo();
#else
frameBuffer = new CFbAccelCSHD1(); frameBuffer = new CFbAccelCSHD1();
#endif #endif
#ifdef BOXMODEL_APOLLO
frameBuffer = new CFbAccelCSHD2();
#endif
#endif #endif
#if HAVE_GENERIC_HARDWARE #if HAVE_GENERIC_HARDWARE
frameBuffer = new CFbAccelGLFB(); frameBuffer = new CFbAccelGLFB();