Disable image loader code.

This commit is contained in:
John Preston
2019-07-18 11:22:27 +02:00
parent 4c8a4d6e3f
commit 14167128d1
2 changed files with 24 additions and 1 deletions

View File

@@ -8,9 +8,12 @@
//#define LOTTIE_LOGGING_SUPPORT
//enable module building of image loader
#define LOTTIE_IMAGE_MODULE_SUPPORT
//#define LOTTIE_IMAGE_MODULE_SUPPORT
//enable lottie model caching
//#define LOTTIE_CACHE_SUPPORT
// disable image loader
#define LOTTIE_IMAGE_MODULE_DISABLED
#endif // CONFIG_H

View File

@@ -19,6 +19,24 @@ using lottie_image_free_f = void (*)(unsigned char *);
extern "C" {
#endif
#ifdef LOTTIE_IMAGE_MODULE_DISABLED
unsigned char *lottie_image_load(char const *filename, int *x, int *y,
int *comp, int req_comp)
{
return nullptr;
}
unsigned char *lottie_image_load_from_data(const char *imageData, int len,
int *x, int *y, int *comp,
int req_comp)
{
return nullptr;
}
void lottie_image_free(unsigned char *data) {}
#else
extern unsigned char *lottie_image_load(char const *filename, int *x, int *y,
int *comp, int req_comp);
extern unsigned char *lottie_image_load_from_data(const char *imageData,
@@ -26,6 +44,8 @@ extern unsigned char *lottie_image_load_from_data(const char *imageData,
int *comp, int req_comp);
extern void lottie_image_free(unsigned char *data);
#endif
#ifdef __cplusplus
}
#endif