forked from len0rd/rockbox
rk27xx - implement partial lcd updates
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30624 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
da09f7f0f1
commit
88455968f4
1 changed files with 20 additions and 11 deletions
|
|
@ -286,21 +286,30 @@ void lcd_init_device()
|
||||||
*/
|
*/
|
||||||
void lcd_update()
|
void lcd_update()
|
||||||
{
|
{
|
||||||
unsigned int x,y;
|
lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
|
||||||
|
|
||||||
for (y=0; y<240; y++)
|
|
||||||
for (x=0; x<400; x++)
|
|
||||||
LCD_DATA = lcd_pixel_transform(lcd_framebuffer[y][x]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* not implemented yet */
|
|
||||||
void lcd_update_rect(int x, int y, int width, int height)
|
void lcd_update_rect(int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
(void)x;
|
int px = x, py = y;
|
||||||
(void)y;
|
int pxmax = x + width, pymax = y + height;
|
||||||
(void)width;
|
|
||||||
(void)height;
|
/* addresses setup */
|
||||||
lcd_update();
|
lcd_write_reg(WINDOW_H_START, y);
|
||||||
|
lcd_write_reg(WINDOW_H_END, pymax-1);
|
||||||
|
lcd_write_reg(WINDOW_V_START, x);
|
||||||
|
lcd_write_reg(WINDOW_V_END, pxmax-1);
|
||||||
|
lcd_write_reg(GRAM_H_ADDR, y);
|
||||||
|
lcd_write_reg(GRAM_V_ADDR, x);
|
||||||
|
|
||||||
|
lcd_cmd(GRAM_WRITE);
|
||||||
|
|
||||||
|
for (py=y; py<pymax; py++)
|
||||||
|
{
|
||||||
|
for (px=x; px<pxmax; px++)
|
||||||
|
LCD_DATA = lcd_pixel_transform(lcd_framebuffer[py][px]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Blit a YUV bitmap directly to the LCD */
|
/* Blit a YUV bitmap directly to the LCD */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue