backends/drm: inline renderFramebufferToSurface
And also remove an unnecessary makeContextCurrent
This commit is contained in:
parent
c498d31aa7
commit
cfdb303012
2 changed files with 6 additions and 13 deletions
|
@ -234,7 +234,9 @@ bool EglGbmBackend::swapBuffers(DrmAbstractOutput *drmOutput, const QRegion &dir
|
|||
{
|
||||
Q_ASSERT(m_outputs.contains(drmOutput));
|
||||
Output &output = m_outputs[drmOutput];
|
||||
renderFramebufferToSurface(output);
|
||||
if (output.current.shadowBuffer) {
|
||||
output.current.shadowBuffer->render(output.output);
|
||||
}
|
||||
if (output.current.gbmSurface->swapBuffers()) {
|
||||
cleanupRenderData(output.old);
|
||||
updateBufferAge(output, dirty);
|
||||
|
@ -353,16 +355,6 @@ QSharedPointer<DrmBuffer> EglGbmBackend::importFramebuffer(Output &output, const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void EglGbmBackend::renderFramebufferToSurface(Output &output)
|
||||
{
|
||||
if (!output.current.shadowBuffer) {
|
||||
// No additional render target.
|
||||
return;
|
||||
}
|
||||
output.current.gbmSurface->makeContextCurrent();
|
||||
output.current.shadowBuffer->render(output.output);
|
||||
}
|
||||
|
||||
bool EglGbmBackend::initBufferConfigs()
|
||||
{
|
||||
const EGLint config_attribs[] = {
|
||||
|
@ -581,7 +573,9 @@ QSharedPointer<DrmBuffer> EglGbmBackend::endFrameWithBuffer(AbstractOutput *drmO
|
|||
Q_ASSERT(m_outputs.contains(drmOutput));
|
||||
Output &output = m_outputs[drmOutput];
|
||||
if (isPrimary()) {
|
||||
renderFramebufferToSurface(output);
|
||||
if (output.current.shadowBuffer) {
|
||||
output.current.shadowBuffer->render(output.output);
|
||||
}
|
||||
auto buffer = output.current.gbmSurface->swapBuffersForDrm();
|
||||
if (buffer) {
|
||||
updateBufferAge(output, dirty);
|
||||
|
|
|
@ -123,7 +123,6 @@ private:
|
|||
|
||||
void setViewport(const Output &output) const;
|
||||
|
||||
void renderFramebufferToSurface(Output &output);
|
||||
QRegion prepareRenderingForOutput(Output &output);
|
||||
QSharedPointer<DrmBuffer> importFramebuffer(Output &output, const QRegion &dirty) const;
|
||||
QSharedPointer<DrmBuffer> endFrameWithBuffer(AbstractOutput *output, const QRegion &dirty);
|
||||
|
|
Loading…
Reference in a new issue