mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
NX graphics library: Macroize some color operators that become trivial when there is only one color plane
This commit is contained in:
@@ -633,8 +633,12 @@ void nxgl_trapcopy(FAR struct nxgl_trapezoid_s *dest,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_NX_NPLANES == 1
|
||||
# define nxgl_colorcopy(d,s) do { (d)[0] = s[0]; } while (0)
|
||||
#else
|
||||
void nxgl_colorcopy(nxgl_mxpixel_t dest[CONFIG_NX_NPLANES],
|
||||
const nxgl_mxpixel_t src[CONFIG_NX_NPLANES]);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_colorcmp
|
||||
@@ -646,8 +650,12 @@ void nxgl_colorcopy(nxgl_mxpixel_t dest[CONFIG_NX_NPLANES],
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_NX_NPLANES == 1
|
||||
# define nxgl_colorcmp(d,s) ((d)[0] == s[0])
|
||||
#else
|
||||
bool nxgl_colorcmp(const nxgl_mxpixel_t color1[CONFIG_NX_NPLANES],
|
||||
const nxgl_mxpixel_t color2[CONFIG_NX_NPLANES]);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_splitline
|
||||
|
||||
Reference in New Issue
Block a user