From 262b3eb33593c638c46a30423c3774d9fe8171fc Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 1 Jul 2020 20:02:35 +0400 Subject: [PATCH] Optimize a redundant QImage detach. --- ui/emoji_config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/emoji_config.cpp b/ui/emoji_config.cpp index 1321614..98a3d07 100644 --- a/ui/emoji_config.cpp +++ b/ui/emoji_config.cpp @@ -294,6 +294,10 @@ QImage LoadFromFile(int id, int size, int index) { || false) { return QImage(); } + + // This should remove a non necessary detach on Retina screens later. + result.setDevicePixelRatio(style::DevicePixelRatio()); + crl::async([=, signature = std::move(signature)] { // This should not happen (invalid signature), // so we delay this check and fix only the next launch.