mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
This commit brings the per-framebuffer logic to code-complete. Still untested.
Squashed commit of the following:
Update TODO list
graphics/nxbe: The moverectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).
graphics/nxbe: The filltrapezond renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).
graphics/nxbe: The getrectangle method now returns data from the per-window framebuffer if available.
graphics/nxbe: The fillrectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).
graphics/nxmu: If a window supports a per-window framebuffer, then redraw callbacks are suppressed and the device content is updated from the shadow, per-window framebuffer. graphics/nxbe: The copyrectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).
graphics/nxbe/nxbe_setsize.c: Reallocate the per-window framebuffer when the window size changes.
This commit is contained in:
+188
-6
@@ -220,7 +220,7 @@ void nxgl_yuv2rgb(uint8_t y, uint8_t u, uint8_t v,
|
||||
/* Rasterizers **************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_setpixel_*bpp
|
||||
* Name: nxgl_setpixel_*bpp / pwfb_setpixel_*bpp
|
||||
*
|
||||
* Description:
|
||||
* Draw a single pixel in graphics memory at the given position and
|
||||
@@ -229,6 +229,8 @@ void nxgl_yuv2rgb(uint8_t y, uint8_t u, uint8_t v,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* For direct access to graphics device memory */
|
||||
|
||||
void nxgl_setpixel_1bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_point_s *pos, uint8_t color);
|
||||
void nxgl_setpixel_2bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
@@ -244,14 +246,35 @@ void nxgl_setpixel_24bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
void nxgl_setpixel_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_point_s *pos, uint32_t color);
|
||||
|
||||
#ifdef CONFIG_NX_RAMBACKED
|
||||
/* For access to per-window framebuffer memory */
|
||||
|
||||
void pwfb_setpixel_1bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_point_s *pos, uint8_t color);
|
||||
void pwfb_setpixel_2bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_point_s *pos, uint8_t color);
|
||||
void pwfb_setpixel_4bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_point_s *pos, uint8_t color);
|
||||
void pwfb_setpixel_8bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_point_s *pos, uint8_t color);
|
||||
void pwfb_setpixel_16bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_point_s *pos, uint16_t color);
|
||||
void pwfb_setpixel_24bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_point_s *pos, uint32_t color);
|
||||
void pwfb_setpixel_32bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_point_s *pos, uint32_t color);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_fillrectangle_*bpp
|
||||
* Name: nxgl_fillrectangle_*bpp / pwfb_fillrectangle_*bpp
|
||||
*
|
||||
* Description:
|
||||
* Fill a rectangle region in the graphics memory with a fixed color
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* For direct access to graphics device memory */
|
||||
|
||||
void nxgl_fillrectangle_1bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
uint8_t color);
|
||||
@@ -274,8 +297,34 @@ void nxgl_fillrectangle_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
uint32_t color);
|
||||
|
||||
#ifdef CONFIG_NX_RAMBACKED
|
||||
/* For access to per-window framebuffer memory */
|
||||
|
||||
void pwfb_fillrectangle_1bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
uint8_t color);
|
||||
void pwfb_fillrectangle_2bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
uint8_t color);
|
||||
void pwfb_fillrectangle_4bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
uint8_t color);
|
||||
void pwfb_fillrectangle_8bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
uint8_t color);
|
||||
void pwfb_fillrectangle_16bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
uint16_t color);
|
||||
void pwfb_fillrectangle_24bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
uint32_t color);
|
||||
void pwfb_fillrectangle_32bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
uint32_t color);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_getrectangle_*bpp
|
||||
* Name: nxgl_getrectangle_*bpp / pwfb_getrectangle_*bpp
|
||||
*
|
||||
* Description:
|
||||
* Fetch a rectangular region from graphics memory. The source is
|
||||
@@ -283,6 +332,8 @@ void nxgl_fillrectangle_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* For direct access to graphics device memory */
|
||||
|
||||
void nxgl_getrectangle_1bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR void *dest, unsigned int deststride);
|
||||
@@ -305,8 +356,34 @@ void nxgl_getrectangle_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR void *dest, unsigned int deststride);
|
||||
|
||||
#ifdef CONFIG_NX_RAMBACKED
|
||||
/* For access to per-window framebuffer memory */
|
||||
|
||||
void pwfb_getrectangle_1bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR void *dest, unsigned int deststride);
|
||||
void pwfb_getrectangle_2bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR void *dest, unsigned int deststride);
|
||||
void pwfb_getrectangle_4bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR void *dest, unsigned int deststride);
|
||||
void pwfb_getrectangle_8bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR void *dest, unsigned int deststride);
|
||||
void pwfb_getrectangle_16bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR void *dest, unsigned int deststride);
|
||||
void pwfb_getrectangle_24bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR void *dest, unsigned int deststride);
|
||||
void pwfb_getrectangle_32bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR void *dest, unsigned int deststride);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxglib_filltrapezoid_*bpp
|
||||
* Name: nxglib_filltrapezoid_*bpp / pwfb_filltrapezoid_*bpp
|
||||
*
|
||||
* Description:
|
||||
* Fill a trapezoidal region in the graphics memory with a fixed color.
|
||||
@@ -315,6 +392,8 @@ void nxgl_getrectangle_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* For direct access to graphics device memory */
|
||||
|
||||
void nxgl_filltrapezoid_1bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_trapezoid_s *trap,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
@@ -344,8 +423,41 @@ void nxgl_filltrapezoid_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
uint32_t color);
|
||||
|
||||
#ifdef CONFIG_NX_RAMBACKED
|
||||
/* For access to per-window framebuffer memory */
|
||||
|
||||
void pwfb_filltrapezoid_1bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_trapezoid_s *trap,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
uint8_t color);
|
||||
void pwfb_filltrapezoid_2bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_trapezoid_s *trap,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
uint8_t color);
|
||||
void pwfb_filltrapezoid_4bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_trapezoid_s *trap,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
uint8_t color);
|
||||
void pwfb_filltrapezoid_8bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_trapezoid_s *trap,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
uint8_t color);
|
||||
void pwfb_filltrapezoid_16bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_trapezoid_s *trap,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
uint16_t color);
|
||||
void pwfb_filltrapezoid_24bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_trapezoid_s *trap,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
uint32_t color);
|
||||
void pwfb_filltrapezoid_32bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_trapezoid_s *trap,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
uint32_t color);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_moverectangle_*bpp
|
||||
* Name: nxgl_moverectangle_*bpp / pwfb_moverectangle_*bpp
|
||||
*
|
||||
* Description:
|
||||
* Move a rectangular region from location to another in the
|
||||
@@ -355,6 +467,8 @@ void nxgl_filltrapezoid_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* For direct access to graphics device memory */
|
||||
|
||||
void nxgl_moverectangle_1bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR struct nxgl_point_s *offset);
|
||||
@@ -377,8 +491,34 @@ void nxgl_moverectangle_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR struct nxgl_point_s *offset);
|
||||
|
||||
#ifdef CONFIG_NX_RAMBACKED
|
||||
/* For access to per-window framebuffer memory */
|
||||
|
||||
void pwfb_moverectangle_1bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR struct nxgl_point_s *offset);
|
||||
void pwfb_moverectangle_2bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR struct nxgl_point_s *offset);
|
||||
void pwfb_moverectangle_4bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR struct nxgl_point_s *offset);
|
||||
void pwfb_moverectangle_8bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR struct nxgl_point_s *offset);
|
||||
void pwfb_moverectangle_16bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR struct nxgl_point_s *offset);
|
||||
void pwfb_moverectangle_24bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR struct nxgl_point_s *offset);
|
||||
void pwfb_moverectangle_32bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
FAR struct nxgl_point_s *offset);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_copyrectangle_*bpp
|
||||
* Name: nxgl_copyrectangle_*bpp / pwfb_copyrectangle_*bpp
|
||||
*
|
||||
* Description:
|
||||
* Copy a rectangular bitmap image into the specific position in the
|
||||
@@ -386,6 +526,8 @@ void nxgl_moverectangle_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* For direct access to graphics device memory */
|
||||
|
||||
void nxgl_copyrectangle_1bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_rect_s *dest,
|
||||
FAR const void *src,
|
||||
@@ -422,6 +564,46 @@ void nxgl_copyrectangle_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
|
||||
FAR const struct nxgl_point_s *origin,
|
||||
unsigned int srcstride);
|
||||
|
||||
#ifdef CONFIG_NX_RAMBACKED
|
||||
/* For access to per-window framebuffer memory */
|
||||
|
||||
void pwfb_copyrectangle_1bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *dest,
|
||||
FAR const void *src,
|
||||
FAR const struct nxgl_point_s *origin,
|
||||
unsigned int srcstride);
|
||||
void pwfb_copyrectangle_2bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *dest,
|
||||
FAR const void *src,
|
||||
FAR const struct nxgl_point_s *origin,
|
||||
unsigned int srcstride);
|
||||
void pwfb_copyrectangle_4bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *dest,
|
||||
FAR const void *src,
|
||||
FAR const struct nxgl_point_s *origin,
|
||||
unsigned int srcstride);
|
||||
void pwfb_copyrectangle_8bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *dest,
|
||||
FAR const void *src,
|
||||
FAR const struct nxgl_point_s *origin,
|
||||
unsigned int srcstride);
|
||||
void pwfb_copyrectangle_16bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *dest,
|
||||
FAR const void *src,
|
||||
FAR const struct nxgl_point_s *origin,
|
||||
unsigned int srcstride);
|
||||
void pwfb_copyrectangle_24bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *dest,
|
||||
FAR const void *src,
|
||||
FAR const struct nxgl_point_s *origin,
|
||||
unsigned int srcstride);
|
||||
void pwfb_copyrectangle_32bpp(FAR struct nxbe_window_s *bwnd,
|
||||
FAR const struct nxgl_rect_s *dest,
|
||||
FAR const void *src,
|
||||
FAR const struct nxgl_point_s *origin,
|
||||
unsigned int srcstride);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_rectcopy
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user