|
|
|
|
@ -354,9 +354,6 @@ bool ScreenCastStream::createStream() |
|
|
|
|
|
|
|
|
|
if (m_cursor.mode == KWaylandServer::ScreencastV1Interface::Embedded) { |
|
|
|
|
connect(Cursors::self(), &Cursors::positionChanged, this, [this] { |
|
|
|
|
if (auto scene = Compositor::self()->scene()) { |
|
|
|
|
scene->makeOpenGLContextCurrent(); |
|
|
|
|
} |
|
|
|
|
recordFrame({}); |
|
|
|
|
}); |
|
|
|
|
} else if (m_cursor.mode == KWaylandServer::ScreencastV1Interface::Metadata) { |
|
|
|
|
@ -379,7 +376,6 @@ void ScreenCastStream::stop() |
|
|
|
|
|
|
|
|
|
void ScreenCastStream::recordFrame(const QRegion &_damagedRegion) |
|
|
|
|
{ |
|
|
|
|
static_cast<OpenGLBackend *>(Compositor::self()->backend())->makeCurrent(); |
|
|
|
|
QRegion damagedRegion = _damagedRegion; |
|
|
|
|
Q_ASSERT(!m_stopped); |
|
|
|
|
|
|
|
|
|
@ -428,6 +424,7 @@ void ScreenCastStream::recordFrame(const QRegion &_damagedRegion) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
spa_data->chunk->offset = 0; |
|
|
|
|
static_cast<OpenGLBackend *>(Compositor::self()->backend())->makeCurrent(); |
|
|
|
|
if (data || spa_data[0].type == SPA_DATA_MemFd) { |
|
|
|
|
const bool hasAlpha = m_source->hasAlphaChannel(); |
|
|
|
|
const int bpp = data && !hasAlpha ? 3 : 4; |
|
|
|
|
|