From 2c461b9df3d9a73b1fcd2920929cc5d7c8992286 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 28 Jun 2019 17:47:32 +0200 Subject: [PATCH] Remove profiling logs. --- Telegram/SourceFiles/lottie/lottie_animation.cpp | 5 ++--- Telegram/SourceFiles/lottie/lottie_cache.cpp | 8 -------- Telegram/SourceFiles/lottie/lottie_cache.h | 2 -- Telegram/SourceFiles/lottie/lottie_frame_renderer.cpp | 1 - 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Telegram/SourceFiles/lottie/lottie_animation.cpp b/Telegram/SourceFiles/lottie/lottie_animation.cpp index 2af8da3b14..657765ea01 100644 --- a/Telegram/SourceFiles/lottie/lottie_animation.cpp +++ b/Telegram/SourceFiles/lottie/lottie_animation.cpp @@ -15,7 +15,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "logs.h" #include -#include #include #include #include @@ -59,7 +58,7 @@ std::string UnpackGzip(const QByteArray &bytes) { std::optional ContentError(const QByteArray &content) { if (content.size() > kMaxFileSize) { - qWarning() << "Lottie Error: Too large file: " << content.size(); + LOG(("Lottie Error: Too large file: %1").arg(content.size())); return Error::ParseFailed; } return std::nullopt; @@ -123,7 +122,7 @@ std::unique_ptr CreateFromContent( auto result = rlottie::Animation::loadFromData(string, std::string()); if (!result) { - qWarning() << "Lottie Error: Parse failed."; + LOG(("Lottie Error: Parse failed.")); } return result; } diff --git a/Telegram/SourceFiles/lottie/lottie_cache.cpp b/Telegram/SourceFiles/lottie/lottie_cache.cpp index 2b1892d2f6..3909d9ea5e 100644 --- a/Telegram/SourceFiles/lottie/lottie_cache.cpp +++ b/Telegram/SourceFiles/lottie/lottie_cache.cpp @@ -10,7 +10,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "lottie/lottie_frame_renderer.h" #include "ffmpeg/ffmpeg_utility.h" #include "base/bytes.h" -#include "logs.h" #include #include @@ -546,16 +545,12 @@ void Cache::appendFrame( prepareBuffers(); } Assert(frame.size() == _size); - const auto now = crl::profile(); Encode(_uncompressed, frame, _encode.cache, _encode.context); - const auto enc = crl::profile(); CompressAndSwapFrame( _encode.compressBuffer, (index != 0) ? &_encode.xorCompressBuffer : nullptr, _uncompressed, _previous); - _encode.compress += crl::profile() - enc; - _encode.encode += enc - now; const auto compressed = _encode.compressBuffer; const auto nowSize = (_data.isEmpty() ? headerSize() : _data.size()) + _encode.totalSize; @@ -592,9 +587,6 @@ void Cache::finalizeEncoding() { } if (_data.size() <= kMaxCacheSize) { _put(QByteArray(_data)); - LOG(("SIZE: %1 (%2x%3, %4 frames, %5 encode, %6 compress)").arg(_data.size()).arg(_size.width()).arg(_size.height()).arg(_framesCount).arg(_encode.encode / float64(_encode.compressedFrames.size())).arg(_encode.compress / float64(_encode.compressedFrames.size()))); - } else { - LOG(("WARNING: %1 (%2x%3, %4 frames, %5 encode, %6 compress)").arg(_data.size()).arg(_size.width()).arg(_size.height()).arg(_framesCount).arg(_encode.encode / float64(_encode.compressedFrames.size())).arg(_encode.compress / float64(_encode.compressedFrames.size()))); } _encode = EncodeFields(); } diff --git a/Telegram/SourceFiles/lottie/lottie_cache.h b/Telegram/SourceFiles/lottie/lottie_cache.h index c3a8eebebb..6d1e67b93b 100644 --- a/Telegram/SourceFiles/lottie/lottie_cache.h +++ b/Telegram/SourceFiles/lottie/lottie_cache.h @@ -95,8 +95,6 @@ private: QImage cache; FFmpeg::SwscalePointer context; int totalSize = 0; - crl::profile_time encode = 0; - crl::profile_time compress = 0; }; int headerSize() const; void prepareBuffers(); diff --git a/Telegram/SourceFiles/lottie/lottie_frame_renderer.cpp b/Telegram/SourceFiles/lottie/lottie_frame_renderer.cpp index fa23c93ddf..760ae48901 100644 --- a/Telegram/SourceFiles/lottie/lottie_frame_renderer.cpp +++ b/Telegram/SourceFiles/lottie/lottie_frame_renderer.cpp @@ -10,7 +10,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "lottie/lottie_player.h" #include "lottie/lottie_animation.h" #include "lottie/lottie_cache.h" -#include "logs.h" #include "rlottie.h" #include