1
0
Fork 0
forked from len0rd/rockbox

make the plugin API frambuffer agnostic

Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
This commit is contained in:
Moshe Piekarski 2020-10-06 13:34:04 -05:00 committed by William Wilgus
parent 5d5f8169b5
commit 12f3ed1699
25 changed files with 92 additions and 93 deletions

View file

@ -845,7 +845,7 @@ static void grey_screendump_hook(int fd)
gsrc = _grey_info.values + _GREY_MULUQ(_grey_info.width, gy);
#if LCD_DEPTH == 2
src = rb->lcd_framebuffer + _GREY_MULUQ(LCD_FBWIDTH, y);
src = *rb->lcd_framebuffer + _GREY_MULUQ(LCD_FBWIDTH, y);
do
{
@ -876,7 +876,7 @@ static void grey_screendump_hook(int fd)
#if LCD_DEPTH == 1
mask = BIT_N(y & 7);
src = rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3);
src = *rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3);
do
{
@ -908,7 +908,7 @@ static void grey_screendump_hook(int fd)
#elif LCD_DEPTH == 2
shift = 2 * (y & 3);
src = rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 2);
src = *rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 2);
do
{
@ -933,7 +933,7 @@ static void grey_screendump_hook(int fd)
#if LCD_DEPTH == 2
shift = y & 7;
src = rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3);
src = *rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3);
do
{

View file

@ -227,7 +227,7 @@ static void * _osd_lcd_init_buffers(struct osd *osd, unsigned flags,
osd->back_bitmap_stride = w;
#endif /* end stride type selection */
osd->lcd_bitmap_data = (void *)rb->lcd_framebuffer;
osd->lcd_bitmap_data = (void *)*rb->lcd_framebuffer;
osd->back_bitmap_data = buf;
osd->maxwidth = w;

View file

@ -377,7 +377,7 @@ void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
src += stride * src_y + src_x; /* move starting point */
src_end = src + stride * height;
dst = rb->lcd_framebuffer + LCD_WIDTH * y + x;
dst = *rb->lcd_framebuffer + LCD_WIDTH * y + x;
do
{
@ -444,7 +444,7 @@ void xlcd_color_bitmap_part(const unsigned char *src, int src_x, int src_y,
src += 3 * (stride * src_y + src_x); /* move starting point */
src_end = src + 3 * stride * height;
dst = rb->lcd_framebuffer + LCD_WIDTH * y + x;
dst = *rb->lcd_framebuffer + LCD_WIDTH * y + x;
do
{

View file

@ -43,7 +43,7 @@ void xlcd_scroll_left(int count)
length = (LCD_WIDTH-count)*LCD_FBHEIGHT;
rb->memmove(rb->lcd_framebuffer, rb->lcd_framebuffer + LCD_HEIGHT*count,
rb->memmove(*rb->lcd_framebuffer, *rb->lcd_framebuffer + LCD_HEIGHT*count,
length * sizeof(fb_data));
oldmode = rb->lcd_get_drawmode();
@ -65,8 +65,8 @@ void xlcd_scroll_right(int count)
length = (LCD_WIDTH-count)*LCD_FBHEIGHT;
rb->memmove(rb->lcd_framebuffer + LCD_HEIGHT*count,
rb->lcd_framebuffer, length * sizeof(fb_data));
rb->memmove(*rb->lcd_framebuffer + LCD_HEIGHT*count,
*rb->lcd_framebuffer, length * sizeof(fb_data));
oldmode = rb->lcd_get_drawmode();
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
@ -90,7 +90,7 @@ void xlcd_scroll_up(int count)
length = LCD_HEIGHT - count;
width = LCD_WIDTH-1;
data = rb->lcd_framebuffer;
data = *rb->lcd_framebuffer;
do {
rb->memmove(data,data + count,length * sizeof(fb_data));
@ -119,7 +119,7 @@ void xlcd_scroll_down(int count)
length = LCD_HEIGHT - count;
width = LCD_WIDTH-1;
data = rb->lcd_framebuffer;
data = *rb->lcd_framebuffer;
do {
rb->memmove(data + count, data, length * sizeof(fb_data));
@ -155,7 +155,7 @@ void xlcd_scroll_left(int count)
if (blockcount)
{
unsigned char *data = rb->lcd_framebuffer;
unsigned char *data = *rb->lcd_framebuffer;
unsigned char *data_end = data + LCD_FBWIDTH*LCD_HEIGHT;
do
@ -168,7 +168,7 @@ void xlcd_scroll_left(int count)
if (bitcount)
{
int bx, y;
unsigned char *addr = rb->lcd_framebuffer + blocklen;
unsigned char *addr = *rb->lcd_framebuffer + blocklen;
#if LCD_DEPTH == 2
unsigned fill = (0x55 * (~rb->lcd_get_background() & 3)) << bitcount;
#endif
@ -213,7 +213,7 @@ void xlcd_scroll_right(int count)
if (blockcount)
{
unsigned char *data = rb->lcd_framebuffer;
unsigned char *data = *rb->lcd_framebuffer;
unsigned char *data_end = data + LCD_FBWIDTH*LCD_HEIGHT;
do
@ -226,7 +226,7 @@ void xlcd_scroll_right(int count)
if (bitcount)
{
int bx, y;
unsigned char *addr = rb->lcd_framebuffer + blockcount;
unsigned char *addr = *rb->lcd_framebuffer + blockcount;
#if LCD_DEPTH == 2
unsigned fill = 0x55 * (~rb->lcd_get_background() & 3);
#endif
@ -265,7 +265,7 @@ void xlcd_scroll_left(int count)
return;
}
data = rb->lcd_framebuffer;
data = *rb->lcd_framebuffer;
data_end = data + LCD_WIDTH*LCD_FBHEIGHT;
length = LCD_WIDTH - count;
@ -294,7 +294,7 @@ void xlcd_scroll_right(int count)
return;
}
data = rb->lcd_framebuffer;
data = *rb->lcd_framebuffer;
data_end = data + LCD_WIDTH*LCD_FBHEIGHT;
length = LCD_WIDTH - count;
@ -328,8 +328,8 @@ void xlcd_scroll_up(int count)
length = LCD_HEIGHT - count;
rb->memmove(rb->lcd_framebuffer,
rb->lcd_framebuffer + count * LCD_FBWIDTH,
rb->memmove(*rb->lcd_framebuffer,
*rb->lcd_framebuffer + count * LCD_FBWIDTH,
length * LCD_FBWIDTH * sizeof(fb_data));
oldmode = rb->lcd_get_drawmode();
@ -351,8 +351,8 @@ void xlcd_scroll_down(int count)
length = LCD_HEIGHT - count;
rb->memmove(rb->lcd_framebuffer + count * LCD_FBWIDTH,
rb->lcd_framebuffer,
rb->memmove(*rb->lcd_framebuffer + count * LCD_FBWIDTH,
*rb->lcd_framebuffer,
length * LCD_FBWIDTH * sizeof(fb_data));
oldmode = rb->lcd_get_drawmode();
@ -388,8 +388,8 @@ void xlcd_scroll_up(int count)
if (blockcount)
{
rb->memmove(rb->lcd_framebuffer,
rb->lcd_framebuffer + blockcount * LCD_FBWIDTH,
rb->memmove(*rb->lcd_framebuffer,
*rb->lcd_framebuffer + blockcount * LCD_FBWIDTH,
blocklen * LCD_FBWIDTH * sizeof(fb_data));
}
if (bitcount)
@ -424,7 +424,7 @@ void xlcd_scroll_up(int count)
: /* inputs */
[wide]"r"(LCD_FBWIDTH),
[rows]"r"(blocklen),
[addr]"a"(rb->lcd_framebuffer + blocklen * LCD_FBWIDTH),
[addr]"a"(*rb->lcd_framebuffer + blocklen * LCD_FBWIDTH),
[cnt] "d"(bitcount),
[bkg] "d"(0x55 * (~rb->lcd_get_background() & 3))
: /* clobbers */
@ -432,7 +432,7 @@ void xlcd_scroll_up(int count)
);
#else /* C version */
int x, by;
unsigned char *addr = rb->lcd_framebuffer + blocklen * LCD_FBWIDTH;
unsigned char *addr = *rb->lcd_framebuffer + blocklen * LCD_FBWIDTH;
#if LCD_DEPTH == 2
unsigned fill = 0x55 * (~rb->lcd_get_background() & 3);
#else
@ -457,7 +457,7 @@ void xlcd_scroll_up(int count)
#if LCD_DEPTH == 2
int x, by;
fb_data *addr = rb->lcd_framebuffer + blocklen * LCD_FBWIDTH;
fb_data *addr = *rb->lcd_framebuffer + blocklen * LCD_FBWIDTH;
unsigned fill, mask;
fill = patterns[rb->lcd_get_background() & 3] << 8;
@ -512,8 +512,8 @@ void xlcd_scroll_down(int count)
if (blockcount)
{
rb->memmove(rb->lcd_framebuffer + blockcount * LCD_FBWIDTH,
rb->lcd_framebuffer,
rb->memmove(*rb->lcd_framebuffer + blockcount * LCD_FBWIDTH,
*rb->lcd_framebuffer,
blocklen * LCD_FBWIDTH * sizeof(fb_data));
}
if (bitcount)
@ -548,7 +548,7 @@ void xlcd_scroll_down(int count)
: /* inputs */
[wide]"r"(LCD_WIDTH),
[rows]"r"(blocklen),
[addr]"a"(rb->lcd_framebuffer + blockcount * LCD_FBWIDTH),
[addr]"a"(*rb->lcd_framebuffer + blockcount * LCD_FBWIDTH),
[cnt] "d"(bitcount),
[bkg] "d"((0x55 * (~rb->lcd_get_background() & 3)) << bitcount)
: /* clobbers */
@ -556,7 +556,7 @@ void xlcd_scroll_down(int count)
);
#else /* C version */
int x, by;
unsigned char *addr = rb->lcd_framebuffer + blockcount * LCD_FBWIDTH;
unsigned char *addr = *rb->lcd_framebuffer + blockcount * LCD_FBWIDTH;
#if LCD_DEPTH == 2
unsigned fill = (0x55 * (~rb->lcd_get_background() & 3)) << bitcount;
#else
@ -581,7 +581,7 @@ void xlcd_scroll_down(int count)
#if LCD_DEPTH == 2
int x, by;
fb_data *addr = rb->lcd_framebuffer + blockcount * LCD_FBWIDTH;
fb_data *addr = *rb->lcd_framebuffer + blockcount * LCD_FBWIDTH;
unsigned fill, mask;
fill = patterns[rb->lcd_get_background() & 3] >> (8 - bitcount);