1
0
Fork 0
forked from len0rd/rockbox

lcd drivers: Convert lcd_[remote_]framebuffer to a pointer

Change all lcd drivers to using a pointer to the static framebuffer
instead of directly accessing the static array. This will let us
later do fun things like dynamic framebuffer sizes (RaaA) or
ability to use different buffers for different layers (dynamic
skin backdrops!)

Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
This commit is contained in:
Jonathan Gordon 2012-02-22 21:18:05 +11:00
parent 15c69b8baf
commit b37e6bc8c1
65 changed files with 193 additions and 181 deletions

View file

@ -50,10 +50,10 @@ static const unsigned char colorindex[4] = {128, 85, 43, 0};
static unsigned long get_lcd_remote_pixel(int x, int y)
{
#if LCD_REMOTE_DEPTH == 1
return lcd_remote_framebuffer[y/8][x] & (1 << (y & 7)) ? 0 : (NUM_SHADES-1);
return *FBREMOTEADDR(x, y/8) & (1 << (y & 7)) ? 0 : (NUM_SHADES-1);
#elif LCD_REMOTE_DEPTH == 2
#if LCD_REMOTE_PIXELFORMAT == VERTICAL_INTERLEAVED
unsigned bits = (lcd_remote_framebuffer[y/8][x] >> (y & 7)) & 0x0101;
unsigned bits = (*FBREMOTEADDR(x, y/8) >> (y & 7)) & 0x0101;
return colorindex[(bits | (bits >> 7)) & 3];
#endif
#endif