summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2012-02-22 21:18:05 +1100
committerJonathan Gordon <rockbox@jdgordon.info>2012-02-28 11:44:59 +1100
commitb37e6bc8c119289aca8740dd5e3b60d72f9d6b40 (patch)
tree7ee9d491811c950943f0fc068d2e2b460ff05c6d /firmware/target/arm/imx233
parent15c69b8bafc3e89e1a825b5bbefef4a97f0001b1 (diff)
downloadrockbox-b37e6bc8c119289aca8740dd5e3b60d72f9d6b40.tar.gz
rockbox-b37e6bc8c119289aca8740dd5e3b60d72f9d6b40.zip
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
Diffstat (limited to 'firmware/target/arm/imx233')
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
index c2e80ad1fc..b25fff8c3b 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
@@ -533,12 +533,12 @@ void lcd_update_rect(int x, int y, int w, int h)
533 */ 533 */
534 if(w == LCD_WIDTH) 534 if(w == LCD_WIDTH)
535 { 535 {
536 memcpy((void *)FRAME, &lcd_framebuffer[y][x], w * h * sizeof(fb_data)); 536 memcpy((void *)FRAME, FBADDR(x,y), w * h * sizeof(fb_data));
537 } 537 }
538 else 538 else
539 { 539 {
540 for(int i = 0; i < h; i++) 540 for(int i = 0; i < h; i++)
541 memcpy((fb_data *)FRAME + i * w, &lcd_framebuffer[y + i][x], w * sizeof(fb_data)); 541 memcpy((fb_data *)FRAME + i * w, FBADDR(x,y + i), w * sizeof(fb_data));
542 } 542 }
543 /* WARNING The LCDIF has a limitation on the vertical count ! In 16-bit packed mode 543 /* WARNING The LCDIF has a limitation on the vertical count ! In 16-bit packed mode
544 * (which we used, ie 16-bit per pixel, 2 pixels per 32-bit words), the v_count 544 * (which we used, ie 16-bit per pixel, 2 pixels per 32-bit words), the v_count
@@ -599,10 +599,10 @@ void lcd_blit_yuv(unsigned char * const src[3],
599 linecounter = height >> 1; 599 linecounter = height >> 1;
600 600
601 #if LCD_WIDTH >= LCD_HEIGHT 601 #if LCD_WIDTH >= LCD_HEIGHT
602 dst = &lcd_framebuffer[y][x]; 602 dst = FBADDR(x,y);
603 row_end = dst + width; 603 row_end = dst + width;
604 #else 604 #else
605 dst = &lcd_framebuffer[x][LCD_WIDTH - y - 1]; 605 dst = FBADDR(LCD_WIDTH - y - 1,x);
606 row_end = dst + LCD_WIDTH * width; 606 row_end = dst + LCD_WIDTH * width;
607 #endif 607 #endif
608 608