driver/fbaccel/spark: don't use blitter for drawing simple lines

Origin commit data
------------------
Commit: 5f31754bbd
Author: martii <m4rtii@gmx.de>
Date: 2013-08-09 (Fri, 09 Aug 2013)
This commit is contained in:
martii
2013-08-09 15:38:00 +02:00
committed by Stefan Seyfried
parent e315916578
commit a6b859345d

View File

@@ -380,6 +380,26 @@ void CFbAccel::paintRect(const int x, const int y, const int dx, const int dy, c
if (dx <= 0 || dy <= 0) if (dx <= 0 || dy <= 0)
return; return;
// The STM blitter introduces considerable overhead probably not worth for single lines. --martii
if (dx == 1) {
waitForIdle();
fb_pixel_t *fbs = fb->getFrameBufferPointer() + (DEFAULT_XRES * y) + x;
fb_pixel_t *fbe = fbs + DEFAULT_XRES * dy;
while (fbs < fbe) {
*fbs = col;
fbs += DEFAULT_XRES;
}
return;
}
if (dy == 1) {
waitForIdle();
fb_pixel_t *fbs = fb->getFrameBufferPointer() + (DEFAULT_XRES * y) + x;
fb_pixel_t *fbe = fbs + dx;
while (fbs < fbe)
*fbs++ = col;
return;
}
/* function has const parameters, so copy them here... */ /* function has const parameters, so copy them here... */
int width = dx; int width = dx;
int height = dy; int height = dy;