backends/drm: outputLayer -> primaryLayer
It makes terminology consistent.
This commit is contained in:
parent
47e78b5463
commit
f191efb39e
9 changed files with 17 additions and 17 deletions
|
@ -30,7 +30,7 @@ public:
|
||||||
DrmGpu *gpu() const;
|
DrmGpu *gpu() const;
|
||||||
|
|
||||||
virtual bool present() = 0;
|
virtual bool present() = 0;
|
||||||
virtual DrmOutputLayer *outputLayer() const = 0;
|
virtual DrmOutputLayer *primaryLayer() const = 0;
|
||||||
|
|
||||||
void updateEnabled(bool enabled);
|
void updateEnabled(bool enabled);
|
||||||
|
|
||||||
|
|
|
@ -208,13 +208,13 @@ void EglGbmBackend::present(Output *output)
|
||||||
|
|
||||||
OutputLayer *EglGbmBackend::primaryLayer(Output *output)
|
OutputLayer *EglGbmBackend::primaryLayer(Output *output)
|
||||||
{
|
{
|
||||||
return static_cast<DrmAbstractOutput *>(output)->outputLayer();
|
return static_cast<DrmAbstractOutput *>(output)->primaryLayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<GLTexture> EglGbmBackend::textureForOutput(Output *output) const
|
std::shared_ptr<GLTexture> EglGbmBackend::textureForOutput(Output *output) const
|
||||||
{
|
{
|
||||||
const auto drmOutput = static_cast<DrmAbstractOutput *>(output);
|
const auto drmOutput = static_cast<DrmAbstractOutput *>(output);
|
||||||
return static_cast<EglGbmLayer *>(drmOutput->outputLayer())->texture();
|
return static_cast<EglGbmLayer *>(drmOutput->primaryLayer())->texture();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<GbmFormat> EglGbmBackend::gbmFormatForDrmFormat(uint32_t format) const
|
std::optional<GbmFormat> EglGbmBackend::gbmFormatForDrmFormat(uint32_t format) const
|
||||||
|
|
|
@ -767,7 +767,7 @@ void DrmGpu::releaseBuffers()
|
||||||
pipeline->cursorLayer()->releaseBuffers();
|
pipeline->cursorLayer()->releaseBuffers();
|
||||||
}
|
}
|
||||||
for (const auto &output : std::as_const(m_virtualOutputs)) {
|
for (const auto &output : std::as_const(m_virtualOutputs)) {
|
||||||
output->outputLayer()->releaseBuffers();
|
output->primaryLayer()->releaseBuffers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -453,7 +453,7 @@ bool DrmOutput::usesSoftwareCursor() const
|
||||||
return !m_setCursorSuccessful || !m_moveCursorSuccessful;
|
return !m_setCursorSuccessful || !m_moveCursorSuccessful;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrmOutputLayer *DrmOutput::outputLayer() const
|
DrmOutputLayer *DrmOutput::primaryLayer() const
|
||||||
{
|
{
|
||||||
return m_pipeline->primaryLayer();
|
return m_pipeline->primaryLayer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
DrmPipeline *pipeline() const;
|
DrmPipeline *pipeline() const;
|
||||||
|
|
||||||
bool present() override;
|
bool present() override;
|
||||||
DrmOutputLayer *outputLayer() const override;
|
DrmOutputLayer *primaryLayer() const override;
|
||||||
|
|
||||||
bool queueChanges(const OutputConfiguration &config);
|
bool queueChanges(const OutputConfiguration &config);
|
||||||
void applyQueuedChanges(const OutputConfiguration &config);
|
void applyQueuedChanges(const OutputConfiguration &config);
|
||||||
|
|
|
@ -41,7 +41,7 @@ void DrmQPainterBackend::present(Output *output)
|
||||||
|
|
||||||
OutputLayer *DrmQPainterBackend::primaryLayer(Output *output)
|
OutputLayer *DrmQPainterBackend::primaryLayer(Output *output)
|
||||||
{
|
{
|
||||||
return static_cast<DrmAbstractOutput *>(output)->outputLayer();
|
return static_cast<DrmAbstractOutput *>(output)->primaryLayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<DrmPipelineLayer> DrmQPainterBackend::createPrimaryLayer(DrmPipeline *pipeline)
|
std::shared_ptr<DrmPipelineLayer> DrmQPainterBackend::createPrimaryLayer(DrmPipeline *pipeline)
|
||||||
|
|
|
@ -69,7 +69,7 @@ void DrmVirtualOutput::setDpmsMode(DpmsMode mode)
|
||||||
setState(next);
|
setState(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
DrmOutputLayer *DrmVirtualOutput::outputLayer() const
|
DrmOutputLayer *DrmVirtualOutput::primaryLayer() const
|
||||||
{
|
{
|
||||||
return m_layer.get();
|
return m_layer.get();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
~DrmVirtualOutput() override;
|
~DrmVirtualOutput() override;
|
||||||
|
|
||||||
bool present() override;
|
bool present() override;
|
||||||
DrmOutputLayer *outputLayer() const override;
|
DrmOutputLayer *primaryLayer() const override;
|
||||||
void recreateSurface();
|
void recreateSurface();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -615,12 +615,12 @@ void Compositor::composite(RenderLoop *renderLoop)
|
||||||
}
|
}
|
||||||
|
|
||||||
Output *output = findOutput(renderLoop);
|
Output *output = findOutput(renderLoop);
|
||||||
OutputLayer *outputLayer = m_backend->primaryLayer(output);
|
OutputLayer *primaryLayer = m_backend->primaryLayer(output);
|
||||||
fTraceDuration("Paint (", output->name(), ")");
|
fTraceDuration("Paint (", output->name(), ")");
|
||||||
|
|
||||||
RenderLayer *superLayer = m_superlayers[renderLoop];
|
RenderLayer *superLayer = m_superlayers[renderLoop];
|
||||||
prePaintPass(superLayer);
|
prePaintPass(superLayer);
|
||||||
superLayer->setOutputLayer(outputLayer);
|
superLayer->setOutputLayer(primaryLayer);
|
||||||
|
|
||||||
SurfaceItem *scanoutCandidate = superLayer->delegate()->scanoutCandidate();
|
SurfaceItem *scanoutCandidate = superLayer->delegate()->scanoutCandidate();
|
||||||
renderLoop->setFullscreenSurface(scanoutCandidate);
|
renderLoop->setFullscreenSurface(scanoutCandidate);
|
||||||
|
@ -634,24 +634,24 @@ void Compositor::composite(RenderLoop *renderLoop)
|
||||||
return sublayer->isVisible();
|
return sublayer->isVisible();
|
||||||
});
|
});
|
||||||
if (scanoutPossible && !output->directScanoutInhibited()) {
|
if (scanoutPossible && !output->directScanoutInhibited()) {
|
||||||
directScanout = outputLayer->scanout(scanoutCandidate);
|
directScanout = primaryLayer->scanout(scanoutCandidate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!directScanout) {
|
if (!directScanout) {
|
||||||
QRegion surfaceDamage = outputLayer->repaints();
|
QRegion surfaceDamage = primaryLayer->repaints();
|
||||||
outputLayer->resetRepaints();
|
primaryLayer->resetRepaints();
|
||||||
preparePaintPass(superLayer, &surfaceDamage);
|
preparePaintPass(superLayer, &surfaceDamage);
|
||||||
|
|
||||||
if (auto beginInfo = outputLayer->beginFrame()) {
|
if (auto beginInfo = primaryLayer->beginFrame()) {
|
||||||
auto &[renderTarget, repaint] = beginInfo.value();
|
auto &[renderTarget, repaint] = beginInfo.value();
|
||||||
renderTarget.setDevicePixelRatio(output->scale());
|
renderTarget.setDevicePixelRatio(output->scale());
|
||||||
|
|
||||||
const QRegion bufferDamage = surfaceDamage.united(repaint).intersected(superLayer->rect());
|
const QRegion bufferDamage = surfaceDamage.united(repaint).intersected(superLayer->rect());
|
||||||
outputLayer->aboutToStartPainting(bufferDamage);
|
primaryLayer->aboutToStartPainting(bufferDamage);
|
||||||
|
|
||||||
paintPass(superLayer, &renderTarget, bufferDamage);
|
paintPass(superLayer, &renderTarget, bufferDamage);
|
||||||
outputLayer->endFrame(bufferDamage, surfaceDamage);
|
primaryLayer->endFrame(bufferDamage, surfaceDamage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
renderLoop->endFrame();
|
renderLoop->endFrame();
|
||||||
|
|
Loading…
Reference in a new issue