mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 19:35:08 +00:00
rlottie: enable conditional compilation of logging support.
This commit is contained in:
parent
6dbb4afec9
commit
f672dead57
@ -333,6 +333,9 @@ void Surface::setDrawRegion(size_t x, size_t y, size_t width, size_t height)
|
||||
mDrawArea.w = width;
|
||||
mDrawArea.h = height;
|
||||
}
|
||||
|
||||
|
||||
#ifdef LOTTIE_LOGGING_SUPPORT
|
||||
void initLogging()
|
||||
{
|
||||
#if defined(__ARM_NEON__)
|
||||
@ -344,3 +347,4 @@ void initLogging()
|
||||
}
|
||||
|
||||
V_CONSTRUCTOR_FUNCTION(initLogging)
|
||||
#endif
|
||||
|
||||
@ -4,4 +4,7 @@
|
||||
// enable threading
|
||||
#define LOTTIE_THREAD_SUPPORT
|
||||
|
||||
//enable logging
|
||||
#define LOTTIE_LOGGING_SUPPORT
|
||||
|
||||
#endif // CONFIG_H
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "vdebug.h"
|
||||
#include "config.h"
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
@ -737,8 +738,19 @@ void set_log_level(LogLevel level)
|
||||
loglevel.store(static_cast<unsigned int>(level), std::memory_order_release);
|
||||
}
|
||||
|
||||
#ifdef LOTTIE_LOGGING_SUPPORT
|
||||
|
||||
bool is_logged(LogLevel level)
|
||||
{
|
||||
return static_cast<unsigned int>(level) >=
|
||||
loglevel.load(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
bool is_logged(LogLevel)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user