diff options
author | Joel Bodenmann <joel@embedded.pro> | 2017-01-10 10:28:42 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@embedded.pro> | 2017-01-10 10:28:42 +0100 |
commit | ff8aa099497576217fae6b946506a1de1744ca67 (patch) | |
tree | 97ac1966722e9bc2f094cafbd0f0cc997643c9c8 /src | |
parent | 1cfcd71145af3eaa4ed2058f7c52c4acb543b68d (diff) | |
download | uGFX-ff8aa099497576217fae6b946506a1de1744ca67.tar.gz uGFX-ff8aa099497576217fae6b946506a1de1744ca67.tar.bz2 uGFX-ff8aa099497576217fae6b946506a1de1744ca67.zip |
Adding GDISP_IMAGE_PNG_BLIT_BUFFER_SIZE configuration option
Diffstat (limited to 'src')
-rw-r--r-- | src/gdisp/gdisp_image_png.c | 7 | ||||
-rw-r--r-- | src/gdisp/gdisp_options.h | 8 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/gdisp/gdisp_image_png.c b/src/gdisp/gdisp_image_png.c index 8b2bfb04..9fa1c68e 100644 --- a/src/gdisp/gdisp_image_png.c +++ b/src/gdisp/gdisp_image_png.c @@ -12,11 +12,6 @@ #include "gdisp_image_support.h" /** - * How big a pixel array to allocate for blitting the image to the display (in pixels) - * Bigger is faster but uses more RAM. - */ -#define PNG_BLIT_BUFFER_SIZE 32 -/** * How big a byte array to use for input file buffer * Bigger is faster but uses more RAM. * Must be more than 8 bytes @@ -89,7 +84,7 @@ typedef struct PNG_output { coord_t sx, sy; coord_t ix, iy; unsigned cnt; - pixel_t buf[PNG_BLIT_BUFFER_SIZE]; + pixel_t buf[GDISP_IMAGE_PNG_BLIT_BUFFER_SIZE]; } PNG_output; // Handle the PNG scan line filter diff --git a/src/gdisp/gdisp_options.h b/src/gdisp/gdisp_options.h index fa1a21e4..ec043769 100644 --- a/src/gdisp/gdisp_options.h +++ b/src/gdisp/gdisp_options.h @@ -518,6 +518,14 @@ #ifndef GDISP_NEED_IMAGE_PNG_RGBALPHA_16 #define GDISP_NEED_IMAGE_PNG_RGBALPHA_16 TRUE #endif + /** + * @brief The PNG blit buffer size in pixels. + * @details Defaults to TRUE + * @note Bigger is faster but requires more RAM. + */ + #ifndef GDISP_IMAGE_PNG_BLIT_BUFFER_SIZE + #define GDISP_IMAGE_PNG_BLIT_BUFFER_SIZE 32 + #endif /** * @} * |