mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Greyscale library: Plugins can now put the management structure in IRAM for higher update speed. Use this in doom, mpegplayer, and zxbox. Made the api pointer part of the struct.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16066 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
43cc03457d
commit
a72499a125
15 changed files with 110 additions and 90 deletions
|
@ -61,8 +61,8 @@ void grey_clear_display(void)
|
|||
int value = (_grey_info.drawmode & DRMODE_INVERSEVID) ?
|
||||
_grey_info.fg_val : _grey_info.bg_val;
|
||||
|
||||
_grey_rb->memset(_grey_info.buffer, value,
|
||||
_GREY_MULUQ(_grey_info.width, _grey_info.height));
|
||||
_grey_info.rb->memset(_grey_info.buffer, value,
|
||||
_GREY_MULUQ(_grey_info.width, _grey_info.height));
|
||||
}
|
||||
|
||||
/* Set a single pixel */
|
||||
|
@ -194,7 +194,7 @@ void grey_hline(int x1, int x2, int y)
|
|||
dst = &_grey_info.buffer[_GREY_MULUQ(_grey_info.width, y) + x1];
|
||||
|
||||
if (fillopt)
|
||||
_grey_rb->memset(dst, value, x2 - x1 + 1);
|
||||
_grey_info.rb->memset(dst, value, x2 - x1 + 1);
|
||||
else
|
||||
{
|
||||
unsigned char *dst_end = dst + x2 - x1;
|
||||
|
@ -379,7 +379,7 @@ void grey_fillrect(int x, int y, int width, int height)
|
|||
do
|
||||
{
|
||||
if (fillopt)
|
||||
_grey_rb->memset(dst, value, width);
|
||||
_grey_info.rb->memset(dst, value, width);
|
||||
else
|
||||
{
|
||||
unsigned char *dst_row = dst;
|
||||
|
@ -539,7 +539,7 @@ void grey_gray_bitmap(const unsigned char *src, int x, int y, int width,
|
|||
void grey_putsxyofs(int x, int y, int ofs, const unsigned char *str)
|
||||
{
|
||||
int ch;
|
||||
struct font* pf = _grey_rb->font_get(_grey_info.curfont);
|
||||
struct font* pf = _grey_info.rb->font_get(_grey_info.curfont);
|
||||
|
||||
while ((ch = *str++) != '\0' && x < _grey_info.width)
|
||||
{
|
||||
|
@ -603,8 +603,8 @@ void grey_ub_clear_display(void)
|
|||
int value = (_grey_info.drawmode & DRMODE_INVERSEVID) ?
|
||||
_grey_info.fg_val : _grey_info.bg_val;
|
||||
|
||||
_grey_rb->memset(_grey_info.values, value,
|
||||
_GREY_MULUQ(_grey_info.width, _grey_info.height));
|
||||
_grey_info.rb->memset(_grey_info.values, value,
|
||||
_GREY_MULUQ(_grey_info.width, _grey_info.height));
|
||||
}
|
||||
|
||||
/* Draw a partial greyscale bitmap, canonical format */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue