mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
CFbAccelCSNevis: Add paintHLineRel() & paintVLineRel() functions
- Remove unused debug output
Origin commit data
------------------
Branch: ni/coolstream
Commit: 10e82c0ece
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-02-08 (Wed, 08 Feb 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -97,6 +97,8 @@ class CFbAccelCSNevis
|
|||||||
void paintPixel(int x, int y, const fb_pixel_t col);
|
void paintPixel(int x, int y, const fb_pixel_t col);
|
||||||
void paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col);
|
void paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col);
|
||||||
void paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col);
|
void paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col);
|
||||||
|
inline void paintHLineRel(int x, int dx, int y, const fb_pixel_t col) { paintLine(x, y, x+dx, y, col); };
|
||||||
|
inline void paintVLineRel(int x, int y, int dy, const fb_pixel_t col) { paintLine(x, y, x, y+dy, col); };
|
||||||
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
||||||
void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
||||||
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
||||||
|
@@ -207,6 +207,8 @@ void CFbAccelCSNevis::paintPixel(const int x, const int y, const fb_pixel_t col)
|
|||||||
|
|
||||||
void CFbAccelCSNevis::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col)
|
void CFbAccelCSNevis::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col)
|
||||||
{
|
{
|
||||||
|
if (!getActive())
|
||||||
|
return;
|
||||||
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
||||||
/* draw a single vertical line from point xa/ya to xb/yb */
|
/* draw a single vertical line from point xa/ya to xb/yb */
|
||||||
unsigned int cmd = GXA_CMD_NOT_TEXT | GXA_SRC_BMP_SEL(2) | GXA_DST_BMP_SEL(2) | GXA_PARAM_COUNT(2) | GXA_CMD_NOT_ALPHA;
|
unsigned int cmd = GXA_CMD_NOT_TEXT | GXA_SRC_BMP_SEL(2) | GXA_DST_BMP_SEL(2) | GXA_PARAM_COUNT(2) | GXA_CMD_NOT_ALPHA;
|
||||||
@@ -247,7 +249,6 @@ void CFbAccelCSNevis::paintBoxRel(const int x, const int y, const int dx, const
|
|||||||
while (line < dy) {
|
while (line < dy) {
|
||||||
int ofl, ofr;
|
int ofl, ofr;
|
||||||
if (calcCorners(NULL, &ofl, &ofr, dy, line, radius, type)) {
|
if (calcCorners(NULL, &ofl, &ofr, dy, line, radius, type)) {
|
||||||
//printf("3: x %d y %d dx %d dy %d rad %d line %d\n", x, y, dx, dy, radius, line);
|
|
||||||
int rect_height_mult = ((type & CORNER_TOP) && (type & CORNER_BOTTOM)) ? 2 : 1;
|
int rect_height_mult = ((type & CORNER_TOP) && (type & CORNER_BOTTOM)) ? 2 : 1;
|
||||||
_write_gxa(gxa_base, GXA_BLT_CONTROL_REG, 0);
|
_write_gxa(gxa_base, GXA_BLT_CONTROL_REG, 0);
|
||||||
_write_gxa(gxa_base, cmd, GXA_POINT(x, y + line)); /* destination x/y */
|
_write_gxa(gxa_base, cmd, GXA_POINT(x, y + line)); /* destination x/y */
|
||||||
@@ -293,7 +294,6 @@ void CFbAccelCSNevis::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uin
|
|||||||
void *uKva;
|
void *uKva;
|
||||||
|
|
||||||
uKva = cs_phys_addr(fbbuff);
|
uKva = cs_phys_addr(fbbuff);
|
||||||
//printf("CFbAccelCSNevis::blit2FB: data %x Kva %x\n", (int) fbbuff, (int) uKva);
|
|
||||||
|
|
||||||
if (uKva != NULL) {
|
if (uKva != NULL) {
|
||||||
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
||||||
@@ -305,11 +305,9 @@ void CFbAccelCSNevis::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uin
|
|||||||
_write_gxa(gxa_base, cmd, GXA_POINT(xoff, yoff)); /* destination pos */
|
_write_gxa(gxa_base, cmd, GXA_POINT(xoff, yoff)); /* destination pos */
|
||||||
_write_gxa(gxa_base, cmd, GXA_POINT(xc, yc)); /* source width, FIXME real or adjusted xc, yc ? */
|
_write_gxa(gxa_base, cmd, GXA_POINT(xc, yc)); /* source width, FIXME real or adjusted xc, yc ? */
|
||||||
_write_gxa(gxa_base, cmd, GXA_POINT(xp, yp)); /* source pos */
|
_write_gxa(gxa_base, cmd, GXA_POINT(xp, yp)); /* source pos */
|
||||||
//printf(">>>>>[%s:%d] Use HW accel\n", __func__, __LINE__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp);
|
CFrameBuffer::blit2FB(fbbuff, width, height, xoff, yoff, xp, yp, transp);
|
||||||
//printf(">>>>>[%s:%d] NO HW accel\n", __func__, __LINE__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFbAccelCSNevis::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff)
|
void CFbAccelCSNevis::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff)
|
||||||
@@ -330,11 +328,9 @@ void CFbAccelCSNevis::blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint3
|
|||||||
_write_gxa(gxa_base, cmd, GXA_POINT(xc, yc));
|
_write_gxa(gxa_base, cmd, GXA_POINT(xc, yc));
|
||||||
_write_gxa(gxa_base, cmd, GXA_POINT(0, 0));
|
_write_gxa(gxa_base, cmd, GXA_POINT(0, 0));
|
||||||
add_gxa_sync_marker();
|
add_gxa_sync_marker();
|
||||||
//printf(">>>>>[%s:%d] Use HW accel\n", __func__, __LINE__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CFrameBuffer::blitBox2FB(boxBuf, width, height, xoff, yoff);
|
CFrameBuffer::blitBox2FB(boxBuf, width, height, xoff, yoff);
|
||||||
//printf(">>>>>[%s:%d] NO HW accel\n", __func__, __LINE__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFbAccelCSNevis::setupGXA()
|
void CFbAccelCSNevis::setupGXA()
|
||||||
|
Reference in New Issue
Block a user