graphics/nxbe: This seems to fix the last of software cursor bugs. On the LPC54, it looks pretty clean. Not flickery as I feared. Probably not so good on low end displays. Possible transient artifacts? Not sure, maybe. Or maybe my eyes are playing tricks froom staring at this too long.

This commit is contained in:
Gregory Nutt 2019-04-13 15:08:32 -06:00
parent 3025fcefd3
commit c4f618e590
8 changed files with 24 additions and 24 deletions

View file

@ -620,7 +620,7 @@ void nxbe_move(FAR struct nxbe_window_s *wnd,
* Input Parameters:
* wnd - The window that will receive the bitmap image
* dest - Describes the rectangular region on the display that will
* receive the the bit map.
* receive the the bit map (window coordinate frame).
* src - The start of the source image.
* origin - The origin of the upper, left-most corner of the full bitmap.
* Both dest and origin are in window coordinates, however, origin
@ -651,7 +651,7 @@ void nxbe_bitmap_dev(FAR struct nxbe_window_s *wnd,
* Input Parameters:
* wnd - The window that will receive the bitmap image
* dest - Describes the rectangular region on the display that will
* receive the the bit map.
* receive the the bit map (window coordinate frame).
* src - The start of the source image.
* origin - The origin of the upper, left-most corner of the full bitmap.
* Both dest and origin are in window coordinates, however, origin
@ -687,12 +687,12 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd,
*
* Input Parameters (same as for nxbe_bitmap_dev):
* wnd - The window that will receive the bitmap image
* dest - Describes the rectangular region on the display that will
* receive the the bit map.
* dest - Describes the rectangular region in the window that will
* receive the the bit map (window coordinate frame).
* src - The start of the source image.
* origin - The origin of the upper, left-most corner of the full bitmap.
* Both dest and origin are in window coordinates, however, origin
* may lie outside of the display.
* Both dest and origin are in window coordinates, however,
* origin may lie outside of the display.
* stride - The width of the full source image in bytes.
*
* Returned Value:

View file

@ -100,7 +100,7 @@ static void bitmap_clipcopy(FAR struct nxbe_clipops_s *cops,
* Input Parameters:
* wnd - The window that will receive the bitmap image
* dest - Describes the rectangular on the display that will receive the
* the bit map.
* the bit map (window coordinate frame).
* src - The start of the source image.
* origin - The origin of the upper, left-most corner of the full bitmap.
* Both dest and origin are in window coordinates, however, origin
@ -193,7 +193,7 @@ static inline void nxbe_bitmap_pwfb(FAR struct nxbe_window_s *wnd,
* Input Parameters:
* wnd - The window that will receive the bitmap image
* dest - Describes the rectangular region on the display that will
* receive the the bit map.
* receive the the bit map (window coordinate frame).
* src - The start of the source image.
* origin - The origin of the upper, left-most corner of the full bitmap.
* Both dest and origin are in window coordinates, however, origin
@ -293,7 +293,7 @@ void nxbe_bitmap_dev(FAR struct nxbe_window_s *wnd,
* Input Parameters:
* wnd - The window that will receive the bitmap image
* dest - Describes the rectangular region on the display that will
* receive the the bit map.
* receive the the bit map (window coordinate frame).
* src - The start of the source image.
* origin - The origin of the upper, left-most corner of the full bitmap.
* Both dest and origin are in window coordinates, however, origin

View file

@ -114,7 +114,7 @@ void nxbe_cursor_backupdraw_dev(FAR struct nxbe_state_s *be,
{
/* Clip to the limits of the display */
nxgl_rectintersect(&bounds, &bounds, &be->bkgd.bounds);
nxgl_rectintersect(&bounds, rect, &be->bkgd.bounds);
if (!nxgl_nullrect(&bounds))
{
_nxbe_cursor_backupdraw_dev(be, &bounds, plane);
@ -214,10 +214,10 @@ void nxbe_cursor_backupdraw_all(FAR struct nxbe_window_s *wnd,
/* And then let nxbe_cursor_backupdraw_devall() do the rest */
nxbe_cursor_backupdraw_all(be, &bounds);
nxbe_cursor_backupdraw_all(wnd, &bounds);
}
#else
nxbe_cursor_backupdraw(wnd->be, rect, 0);
nxbe_cursor_backupdraw(wnd, rect, 0);
#endif
}

View file

@ -129,7 +129,7 @@ static inline void nxbe_fill_dev(FAR struct nxbe_window_s *wnd,
&info.cops, &wnd->be->plane[i]);
#ifdef CONFIG_NX_SWCURSOR
/* Backup and redraw the cursor in the affect region.
/* Backup and redraw the cursor in the affected region.
*
* REVISIT: This and the following logic belongs in the function
* nxbe_clipfill(). It is here only because the struct nxbe_state_s

View file

@ -71,8 +71,8 @@
*
* Input Parameters (same as for nxbe_flush):
* wnd - The window that will receive the bitmap image
* dest - Describes the rectangular on the display that will receive the
* the bit map (device corrdinates).
* dest - Describes the rectangular region in the window that will
* receive the the bit map (window coordinate frame).
* src - The start of the source image.
* origin - The origin of the upper, left-most corner of the full bitmap.
* Both dest and origin are in window coordinates, however, origin
@ -95,11 +95,11 @@ void nxbe_flush(FAR struct nxbe_window_s *wnd,
nxbe_bitmap_dev(wnd, dest, src, origin, stride);
#ifdef CONFIG_NX_SWCURSOR
/* Update cursor backup memory and redraw the cursor in the modified window
* region.
/* Update cursor backup memory and redraw the cursor in the modified
* window region.
*/
nxbe_cursor_backupdraw_devall(wnd, dest);
nxbe_cursor_backupdraw_all(wnd, dest);
#endif
}

View file

@ -119,8 +119,8 @@ void NXGL_FUNCNAME(nxglib_cursor_backup, NXGLIB_SUFFIX)
/* Get the source and destination addresses */
fbmem = (FAR uint8_t *)plane->pinfo.fbmem;
sline = (FAR uint8_t *)fbmem + sstride * be->cursor.bounds.pt1.y +
NXGL_SCALEX(be->cursor.bounds.pt1.x);
sline = (FAR uint8_t *)fbmem + sstride * intersection.pt1.y +
NXGL_SCALEX(intersection.pt1.x);
dline = (FAR uint8_t *)be->cursor.bkgd + dstride * origin.y +
NXGL_SCALEX(origin.x);

View file

@ -169,8 +169,8 @@ void NXGL_FUNCNAME(nxglib_cursor_draw, NXGLIB_SUFFIX)
fbmem = (FAR uint8_t *)plane->pinfo.fbmem;
sline = be->cursor.image + sstride * origin.y + (origin.x >> 2);
dline = (FAR uint8_t *)fbmem + dstride * be->cursor.bounds.pt1.y +
NXGL_SCALEX(be->cursor.bounds.pt1.x);
dline = (FAR uint8_t *)fbmem + dstride * intersection.pt1.y +
NXGL_SCALEX(intersection.pt1.x);
sshift = (3 - (origin.y & 3)) << 1; /* MS first {0, 2, 4, 6} */

View file

@ -120,8 +120,8 @@ void NXGL_FUNCNAME(nxglib_cursor_erase, NXGLIB_SUFFIX)
fbmem = (FAR uint8_t *)plane->pinfo.fbmem;
sline = (FAR uint8_t *)be->cursor.bkgd + sstride * origin.y +
NXGL_SCALEX(origin.x);
dline = (FAR uint8_t *)fbmem + dstride * be->cursor.bounds.pt1.y +
NXGL_SCALEX(be->cursor.bounds.pt1.x);
dline = (FAR uint8_t *)fbmem + dstride * intersection.pt1.y +
NXGL_SCALEX(intersection.pt1.x);
/* Erase the old cursor position by copying the previous content */