Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/server/qtquick/woutputrenderwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ class Q_DECL_HIDDEN WOutputRenderWindowPrivate : public QQuickWindowPrivate

bool componentCompleted = true;
bool inRendering = false;
bool renderEnabled = true;


QPointer<qw_renderer> m_renderer;
QPointer<qw_allocator> m_allocator;
Expand Down Expand Up @@ -1475,6 +1477,9 @@ void WOutputRenderWindowPrivate::doRender(const QList<OutputHelper *> &outputs,
{
Q_ASSERT(rendererList.isEmpty());
Q_ASSERT(!inRendering);
if (!renderEnabled)
return;

inRendering = true;

W_Q(WOutputRenderWindow);
Expand Down Expand Up @@ -1810,6 +1815,11 @@ bool WOutputRenderWindow::inRendering() const
return d->inRendering;
}

void WOutputRenderWindow::setRenderEnabled(bool enabled) {
Q_D(WOutputRenderWindow);
d->renderEnabled = enabled;
}

QList<QPointer<QQuickItem>> WOutputRenderWindow::paintOrderItemList(QQuickItem *root, std::function<bool(QQuickItem*)> filter)
{
QStack<QQuickItem *> nodes;
Expand Down
1 change: 1 addition & 0 deletions src/server/qtquick/woutputrenderwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class WAYLIB_SERVER_EXPORT WOutputRenderWindow : public QQuickWindow, public QQm
qreal height() const;
WBufferRenderer *currentRenderer() const;
bool inRendering() const;
void setRenderEnabled(bool enabled);

static QList<QPointer<QQuickItem>> paintOrderItemList(QQuickItem *root, std::function<bool(QQuickItem*)> filter);

Expand Down