2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Choose OpenGL / Raster in media viewer.

This commit is contained in:
John Preston
2021-05-20 12:42:24 +04:00
parent ccc599c83e
commit c64e953174
9 changed files with 471 additions and 352 deletions

View File

@@ -107,7 +107,7 @@ Ui::GL::ChosenRenderer Panel::Incoming::chooseRenderer(
}
void paintFallback(
QPainter &&p,
Painter &&p,
const QRegion &clip,
Ui::GL::Backend backend) override {
_owner->paint(
@@ -121,11 +121,15 @@ Ui::GL::ChosenRenderer Panel::Incoming::chooseRenderer(
};
const auto use = Platform::IsMac()
? true
: Platform::IsWindows()
? capabilities.supported
: capabilities.transparency;
LOG(("OpenGL: %1 (Incoming)").arg(Logs::b(use)));
return {
.renderer = std::make_unique<Renderer>(this),
.backend = (capabilities.supported
? Ui::GL::Backend::OpenGL
: Ui::GL::Backend::Raster),
.backend = (use ? Ui::GL::Backend::OpenGL : Ui::GL::Backend::Raster),
};
}