1
0
Fork 0
forked from len0rd/rockbox

Greyscale library: * Defer application of lcd linearisation + gamma in buffered mode to the actual update. This simplifies the update function (grey_update() and grey_update_rect() now are just calls to grey_ub_gray_bitmap_part()), and makes DRMODE_COMPLEMENT work properly. * Make the simulator version work and behave more similar to the target version.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16080 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2008-01-13 18:39:09 +00:00
parent 071c2ac339
commit fa7eb56c84
5 changed files with 95 additions and 206 deletions

View file

@ -49,8 +49,10 @@ void grey_set_position(int x, int y)
if (_grey_info.flags & _GREY_RUNNING)
{
#ifdef SIMULATOR
_grey_info.rb->sim_lcd_ex_update_rect(_grey_info.x, _grey_info.y,
_grey_info.width,
_grey_info.height);
grey_deferred_lcd_update();
grey_update();
#else
_grey_info.flags |= _GREY_DEFERRED_UPDATE;
#endif
@ -72,7 +74,6 @@ int grey_get_drawmode(void)
/* Set the foreground shade for subsequent drawing operations */
void grey_set_foreground(unsigned brightness)
{
_grey_info.fg_val = _grey_info.gvalue[brightness];
_grey_info.fg_brightness = brightness;
}
@ -85,7 +86,6 @@ unsigned grey_get_foreground(void)
/* Set the background shade for subsequent drawing operations */
void grey_set_background(unsigned brightness)
{
_grey_info.bg_val = _grey_info.gvalue[brightness];
_grey_info.bg_brightness = brightness;
}