This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11834 - Increase speed of SDL screen updates
Attached to Project:
Rockbox
Opened by Thomas Jarosch (thomasjfox) - Friday, 24 December 2010, 14:52 GMT+2
Last edited by Thomas Martitz (kugel.) - Monday, 27 December 2010, 23:09 GMT+2
Opened by Thomas Jarosch (thomasjfox) - Friday, 24 December 2010, 14:52 GMT+2
Last edited by Thomas Martitz (kugel.) - Monday, 27 December 2010, 23:09 GMT+2
|
DetailsHello,
attached is a patch to greatly speed up SDL screen updates used by the simulator and RaaA (f.e. on the Nokia N900 ;)). The current code calls SDL_FillRectangle() for every pixel, which is very slow. We can speed things up greatly by using SDL_BlitSurface() if the LCD_DEPTH is >= 8 and the pixel format is normal RGB. Also don't call SDL_LockSurface() in the pixel-by-pixel code as it's only needed if we are manipulating pixels directly. Things to note: - Right now it only works for LCD_DEPTH >= 8 and LCD_PIXELFORMAT == RGB565 - LCD_SoftStretch used for zooming is marked as unstable in the SDL API. Best regards, Thomas |
This task depends upon
Closed by Thomas Martitz (kugel.)
Monday, 27 December 2010, 23:09 GMT+2
Reason for closing: Accepted
Additional comments about closing: r28914. Thanks
Monday, 27 December 2010, 23:09 GMT+2
Reason for closing: Accepted
Additional comments about closing: r28914. Thanks
#if LCD_DEPTH >= 8 && (LCD_PIXELFORMAT == RGB565) \
&& !defined(LCD_STRIDEFORMAT) && !defined(HAVE_LCD_SPLIT)
The previous version had a bug so it took the slow path on the N900.