backends/drm: store gbm buffer for screen recording
This commit is contained in:
parent
774dbf8d2f
commit
e4695325a6
1 changed files with 4 additions and 3 deletions
|
@ -123,12 +123,13 @@ std::optional<std::tuple<std::shared_ptr<DrmFramebuffer>, QRegion>> EglGbmLayerS
|
|||
}
|
||||
GLFramebuffer::popFramebuffer();
|
||||
if (m_gpu == m_eglBackend->gpu()) {
|
||||
const auto buffer = m_gbmSurface->swapBuffers(damagedRegion);
|
||||
if (buffer) {
|
||||
if (const auto buffer = m_gbmSurface->swapBuffers(damagedRegion)) {
|
||||
m_currentBuffer = buffer;
|
||||
return std::tuple(DrmFramebuffer::createFramebuffer(buffer), damagedRegion);
|
||||
}
|
||||
} else {
|
||||
if (m_gbmSurface->swapBuffers(damagedRegion)) {
|
||||
if (const auto gbmBuffer = m_gbmSurface->swapBuffers(damagedRegion)) {
|
||||
m_currentBuffer = gbmBuffer;
|
||||
const auto buffer = importBuffer();
|
||||
if (buffer) {
|
||||
return std::tuple(buffer, damagedRegion);
|
||||
|
|
Loading…
Reference in a new issue