mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
framebuffer-ng: add missing checkFbArea() calls
This commit is contained in:
@@ -899,9 +899,11 @@ _display:
|
|||||||
if (h != 0)
|
if (h != 0)
|
||||||
yy += (h - height) / 2;
|
yy += (h - height) / 2;
|
||||||
|
|
||||||
|
checkFbArea(x, yy, width, height, true);
|
||||||
if (paintBg)
|
if (paintBg)
|
||||||
paintBoxRel(x, yy, width, height, colBg);
|
paintBoxRel(x, yy, width, height, colBg);
|
||||||
blit2FB(data, width, height, x, yy);
|
blit2FB(data, width, height, x, yy);
|
||||||
|
checkFbArea(x, yy, width, height, false);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1057,10 +1059,12 @@ void CFrameBuffer::paintBackgroundBoxRel(int x, int y, int dx, int dy)
|
|||||||
|
|
||||||
if(!useBackgroundPaint)
|
if(!useBackgroundPaint)
|
||||||
{
|
{
|
||||||
|
/* paintBoxRel does its own checkFbArea() */
|
||||||
paintBoxRel(x, y, dx, dy, backgroundColor);
|
paintBoxRel(x, y, dx, dy, backgroundColor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
checkFbArea(x, y, dx, dy, true);
|
||||||
uint8_t * fbpos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
uint8_t * fbpos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
||||||
fb_pixel_t * bkpos = background + x + BACKGROUNDIMAGEWIDTH * y;
|
fb_pixel_t * bkpos = background + x + BACKGROUNDIMAGEWIDTH * y;
|
||||||
for(int count = 0;count < dy; count++)
|
for(int count = 0;count < dy; count++)
|
||||||
@@ -1069,6 +1073,7 @@ void CFrameBuffer::paintBackgroundBoxRel(int x, int y, int dx, int dy)
|
|||||||
fbpos += stride;
|
fbpos += stride;
|
||||||
bkpos += BACKGROUNDIMAGEWIDTH;
|
bkpos += BACKGROUNDIMAGEWIDTH;
|
||||||
}
|
}
|
||||||
|
checkFbArea(x, y, dx, dy, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1079,8 +1084,11 @@ void CFrameBuffer::paintBackground()
|
|||||||
|
|
||||||
if (useBackgroundPaint && (background != NULL))
|
if (useBackgroundPaint && (background != NULL))
|
||||||
{
|
{
|
||||||
|
checkFbArea(0, 0, xRes, yRes, true);
|
||||||
|
/* this does not really work anyway... */
|
||||||
for (int i = 0; i < 576; i++)
|
for (int i = 0; i < 576; i++)
|
||||||
memmove(((uint8_t *)getFrameBufferPointer()) + i * stride, (background + i * BACKGROUNDIMAGEWIDTH), BACKGROUNDIMAGEWIDTH * sizeof(fb_pixel_t));
|
memmove(((uint8_t *)getFrameBufferPointer()) + i * stride, (background + i * BACKGROUNDIMAGEWIDTH), BACKGROUNDIMAGEWIDTH * sizeof(fb_pixel_t));
|
||||||
|
checkFbArea(0, 0, xRes, yRes, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1094,6 +1102,7 @@ void CFrameBuffer::SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const m
|
|||||||
if (!getActive() || memp == NULL)
|
if (!getActive() || memp == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
checkFbArea(x, y, dx, dy, true);
|
||||||
uint8_t * pos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
uint8_t * pos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
||||||
fb_pixel_t * bkpos = memp;
|
fb_pixel_t * bkpos = memp;
|
||||||
for (int count = 0; count < dy; count++) {
|
for (int count = 0; count < dy; count++) {
|
||||||
@@ -1113,7 +1122,7 @@ void CFrameBuffer::SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const m
|
|||||||
bkpos += dx;
|
bkpos += dx;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
checkFbArea(x, y, dx, dy, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrameBuffer::RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * const memp)
|
void CFrameBuffer::RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * const memp)
|
||||||
@@ -1121,6 +1130,7 @@ void CFrameBuffer::RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * cons
|
|||||||
if (!getActive() || memp == NULL)
|
if (!getActive() || memp == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
checkFbArea(x, y, dx, dy, true);
|
||||||
uint8_t * fbpos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
uint8_t * fbpos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
||||||
fb_pixel_t * bkpos = memp;
|
fb_pixel_t * bkpos = memp;
|
||||||
for (int count = 0; count < dy; count++)
|
for (int count = 0; count < dy; count++)
|
||||||
@@ -1130,6 +1140,7 @@ void CFrameBuffer::RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * cons
|
|||||||
bkpos += dx;
|
bkpos += dx;
|
||||||
}
|
}
|
||||||
blit();
|
blit();
|
||||||
|
checkFbArea(x, y, dx, dy, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrameBuffer::Clear()
|
void CFrameBuffer::Clear()
|
||||||
|
Reference in New Issue
Block a user