graphics/nxbe and nxmu: This bring the software cursor to code complete. Still untested. Some flicker is expected. It has not been determined if that level of flicker is acceptable or not.

This commit is contained in:
Gregory Nutt
2019-04-09 15:09:10 -06:00
parent 4aadcc8c28
commit cbb09c55ec
14 changed files with 225 additions and 121 deletions
@@ -63,6 +63,7 @@
*
* Input Parameters:
* be - The back-end state structure instance
* bounds - The region of the display that has been modified.
* planeno - The color plane being drawn
*
* Returned Value:
@@ -71,16 +72,16 @@
****************************************************************************/
void NXGL_FUNCNAME(nxglib_cursor_backup, NXGLIB_SUFFIX)
(FAR struct nxbe_state_s *be, int planeno)
(FAR struct nxbe_state_s *be, FAR const struct nxgl_rect_s *bounds, int planeno)
{
struct nxgl_rect_s intersection;
struct nxgl_point_s origin;
FAR struct nxbe_plane_s *plane;
FAR uint8_t *fbmem;
FAR uint8_t *sline;
FAR const uint8_t *sline;
FAR uint8_t *dline;
FAR NXGL_PIXEL_T *src;
FAR NXGL_PIXEL_T *dest;
FAR const FAR NXGL_PIXEL_T *src;
FAR FAR NXGL_PIXEL_T *dest;
nxgl_coord_t width;
nxgl_coord_t height;
nxgl_coord_t sstride;
@@ -91,6 +92,10 @@ void NXGL_FUNCNAME(nxglib_cursor_backup, NXGLIB_SUFFIX)
/* Handle the case some or all of the backup image is off of the display. */
nxgl_rectintersect(&intersection, &be->cursor.bounds, &be->bkgd.bounds);
/* Check if there is anything in the modified region that we need to handle. */
nxgl_rectintersect(&intersection, &intersection, bounds);
if (!nxgl_nullrect(&intersection))
{
/* Get the width and the height of the images in pixels/rows */
+8 -3
View File
@@ -108,6 +108,7 @@ static NXGL_PIXEL_T nxbe_map_color(FAR struct nxbe_state_s *be, int plane,
*
* Input Parameters:
* be - The back-end state structure instance
* bounds - The region of the display that has been modified.
* planeno - The color plane being drawn
*
* Returned Value:
@@ -116,14 +117,14 @@ static NXGL_PIXEL_T nxbe_map_color(FAR struct nxbe_state_s *be, int plane,
****************************************************************************/
void NXGL_FUNCNAME(nxglib_cursor_draw, NXGLIB_SUFFIX)
(FAR struct nxbe_state_s *be, int planeno)
(FAR struct nxbe_state_s *be, FAR const struct nxgl_rect_s *bounds, int planeno)
{
struct nxgl_rect_s intersection;
struct nxgl_point_s origin;
FAR struct nxbe_plane_s *plane;
FAR uint8_t *fbmem;
FAR uint8_t *src;
FAR uint8_t *sline;
FAR const uint8_t *src;
FAR const uint8_t *sline;
FAR uint8_t *dline;
FAR NXGL_PIXEL_T *dest;
nxgl_coord_t width;
@@ -138,6 +139,10 @@ void NXGL_FUNCNAME(nxglib_cursor_draw, NXGLIB_SUFFIX)
/* Handle the case some or all of the cursor image is off of the display. */
nxgl_rectintersect(&intersection, &be->cursor.bounds, &be->bkgd.bounds);
/* Check if there is anything in the modified region that we need to handle. */
nxgl_rectintersect(&intersection, &intersection, bounds);
if (!nxgl_nullrect(&intersection))
{
/* Get the width and the height of the images in pixels/rows */
+8 -3
View File
@@ -62,6 +62,7 @@
*
* Input Parameters:
* be - The back-end state structure instance
* bounds - The region of the display that has been modified.
* planeno - The color plane being drawn
*
* Returned Value:
@@ -70,15 +71,15 @@
****************************************************************************/
void NXGL_FUNCNAME(nxglib_cursor_erase, NXGLIB_SUFFIX)
(FAR struct nxbe_state_s *be, int planeno)
(FAR struct nxbe_state_s *be, FAR const struct nxgl_rect_s *bounds, int planeno)
{
struct nxgl_rect_s intersection;
struct nxgl_point_s origin;
FAR struct nxbe_plane_s *plane;
FAR uint8_t *fbmem;
FAR uint8_t *sline;
FAR const uint8_t *sline;
FAR uint8_t *dline;
FAR NXGL_PIXEL_T *src;
FAR const NXGL_PIXEL_T *src;
FAR NXGL_PIXEL_T *dest;
nxgl_coord_t width;
nxgl_coord_t height;
@@ -90,6 +91,10 @@ void NXGL_FUNCNAME(nxglib_cursor_erase, NXGLIB_SUFFIX)
/* Handle the case some or all of the cursor image is off of the display. */
nxgl_rectintersect(&intersection, &be->cursor.bounds, &be->bkgd.bounds);
/* Check if there is anything in the modified region that we need to handle. */
nxgl_rectintersect(&intersection, &intersection, bounds);
if (!nxgl_nullrect(&intersection))
{
/* Get the width and the height of the images in pixels/rows */
+36 -12
View File
@@ -464,10 +464,18 @@ void pwfb_copyrectangle_32bpp(FAR struct nxbe_window_s *bwnd,
struct nxbe_state_s; /* Forward reference */
#ifdef CONFIG_NX_SWCURSOR
void nxglib_cursor_draw_8bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_draw_16bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_draw_24bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_draw_32bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_draw_8bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
void nxglib_cursor_draw_16bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
void nxglib_cursor_draw_24bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
void nxglib_cursor_draw_32bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
#endif
/****************************************************************************
@@ -480,10 +488,18 @@ void nxglib_cursor_draw_32bpp(FAR struct nxbe_state_s *be, int planeno);
****************************************************************************/
#ifdef CONFIG_NX_SWCURSOR
void nxglib_cursor_erase_8bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_erase_16bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_erase_24bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_erase_32bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_erase_8bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
void nxglib_cursor_erase_16bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
void nxglib_cursor_erase_24bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
void nxglib_cursor_erase_32bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
#endif
/****************************************************************************
@@ -496,10 +512,18 @@ void nxglib_cursor_erase_32bpp(FAR struct nxbe_state_s *be, int planeno);
****************************************************************************/
#ifdef CONFIG_NX_SWCURSOR
void nxglib_cursor_backup_8bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_backup_16bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_backup_24bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_backup_32bpp(FAR struct nxbe_state_s *be, int planeno);
void nxglib_cursor_backup_8bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
void nxglib_cursor_backup_16bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
void nxglib_cursor_backup_24bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
void nxglib_cursor_backup_32bpp(FAR struct nxbe_state_s *be,
FAR const struct nxgl_rect_s *bounds,
int planeno);
#endif
#undef EXTERN