Optimize a redundant QImage detach.

This commit is contained in:
John Preston 2020-07-01 20:02:35 +04:00
parent 566f301636
commit 262b3eb335

View file

@ -294,6 +294,10 @@ QImage LoadFromFile(int id, int size, int index) {
|| false) { || false) {
return QImage(); return QImage();
} }
// This should remove a non necessary detach on Retina screens later.
result.setDevicePixelRatio(style::DevicePixelRatio());
crl::async([=, signature = std::move(signature)] { crl::async([=, signature = std::move(signature)] {
// This should not happen (invalid signature), // This should not happen (invalid signature),
// so we delay this check and fix only the next launch. // so we delay this check and fix only the next launch.