3#include <QGuiApplication>
6#include "libmythbase/mythconfig.h"
25#if CONFIG_WAYLANDEXTRAS
29#define MYTH_PAINTER_QT QString("Qt")
64 QVector<TryPainter> painterstotry;
71 if (glwindow && glwindow->IsValid())
73 PaintWindow = glwindow;
83 painterstotry.prepend(TryOpenGL);
85 painterstotry.append(TryOpenGL);
93 if (vulkan && vulkan->IsValid())
105 painterstotry.prepend(TryVulkan);
107 painterstotry.append(TryVulkan);
114 LOG(VB_GENERAL, LOG_INFO,
"Using the Qt painter. Video playback will not work!");
124 painterstotry.prepend(TryQt);
126 painterstotry.append(TryQt);
128 for (
auto & trypainter : painterstotry)
129 if (trypainter(MainWin, PaintWin, Paint, warn))
132 return warn ? tr(
"Warning: No GPU acceleration") : QString();
146#if CONFIG_WAYLANDEXTRAS
147 if (QGuiApplication::platformName().toLower().contains(
"wayland"))
155#if CONFIG_WAYLANDEXTRAS
170#ifdef DEBUG_PAINTERWIN_EVENTS
171bool MythPainterWindow::event(QEvent *
Event)
174 return QWidget::event(
Event);
180#if CONFIG_WAYLANDEXTRAS
182 m_waylandDev->SetOpaqueRegion(rect());
void resizeEvent(QResizeEvent *) override
static void DestroyPainters(MythPainterWindow *&PaintWin, MythPainter *&Painter)
static QString CreatePainters(MythMainWindow *MainWin, MythPainterWindow *&PaintWin, MythPainter *&Paint)
MythRender * GetRenderDevice()
MythPainterWindow(MythMainWindow *MainWin)
static MUI_PUBLIC QStringList GetPainters()
~MythPainterWindow() override
static MUI_PUBLIC QString GetDefaultPainter()
bool IsShared(void) const
Warning: The reference count can be decremented between the call to this function and the use of it's...
A simple wrapper to retrieve the major Wayland objects from the Qt Wayland native interface.
static constexpr const char * MYTH_APPNAME_MYTHFRONTEND
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
bool(*)(MythMainWindow *, MythPainterWindow *&, MythPainter *&, bool &) TryPainter
#define MYTH_PAINTER_OPENGL
#define MYTH_PAINTER_VULKAN