109 QWaylandSurfacePrivate::get(surface)->derefView(q);
111 QWaylandOutputPrivate::get(output)->removeView(q, surface);
116 nextBuffer = QWaylandBufferRef();
118 nextDamage = QRegion();
121 QWaylandSurfacePrivate::get(surface)->refView(q);
123 QWaylandOutputPrivate::get(output)->addView(q, surface);
163void QWaylandView::setOutput(QWaylandOutput *newOutput)
166 if (d->output == newOutput)
169 if (d->output && d->surface)
170 QWaylandOutputPrivate::get(d->output)->removeView(
this, d->surface);
172 d->output = newOutput;
174 if (d->output && d->surface)
175 QWaylandOutputPrivate::get(d->output)->addView(
this, d->surface);
177 emit outputChanged();
204bool QWaylandView::advance()
208 if (!d->nextBufferCommitted && !d->forceAdvanceSucceed)
214 if (d->surface && d->surface->primaryView() ==
this) {
215 const auto views = d->surface->views();
216 for (QWaylandView *view : views) {
217 if (view !=
this && view->allowDiscardFrontBuffer() && view->d_func()->currentBuffer == d->currentBuffer)
218 view->discardCurrentBuffer();
222 QMutexLocker locker(&d->bufferMutex);
223 d->forceAdvanceSucceed =
false;
224 d->nextBufferCommitted =
false;
225 d->currentBuffer = d->nextBuffer;
226 d->currentDamage = d->nextDamage;