tuxtxt: simplify FillRect() for Tripledragon

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1393 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 48d34b432d
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-04-11 (Mon, 11 Apr 2011)
This commit is contained in:
Stefan Seyfried
2011-04-11 17:17:42 +00:00
parent d2dd113d9a
commit ef946c8dbc

View File

@@ -36,6 +36,9 @@ void FillRect(int x, int y, int w, int h, int color)
unsigned char *p = lfb + x*4 + y * fix_screeninfo.line_length;
#if !HAVE_TRIPLEDRAGON
unsigned int col = bgra[color][3] << 24 | bgra[color][2] << 16 | bgra[color][1] << 8 | bgra[color][0];
#else
unsigned int col = *((unsigned int*)bgra[color]);
#endif
if (w > 0)
for (int count = 0; count < h; count++) {
unsigned int * dest0 = (unsigned int *)p;
@@ -43,18 +46,6 @@ void FillRect(int x, int y, int w, int h, int color)
*(dest0++) = col;
p += fix_screeninfo.line_length;
}
#else
int xtmp;
if (w > 0)
for ( ; h > 0 ; h--)
{
for (xtmp=0; xtmp<=w; xtmp++)
{
memmove(p+xtmp*4,bgra[color],4);
}
p += fix_screeninfo.line_length;
}
#endif
}
void FillBorder(int color)