plugins/screencast: Allocate offscreen texture in WindowScreenCastSource::render(QImage) as big as the memfd buffer
textureSize() can temporarily mismatch the target buffer size. It can be a problem if glGetTexImage() gets called. glGetTexImage() assumes that the provided buffer is as big as the texture. If it's not, it will write data outside the bounds of the buffer. BUG: 489764
This commit is contained in:
parent
abd790c4b5
commit
a6743fd2f5
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ qreal WindowScreenCastSource::devicePixelRatio() const
|
||||||
|
|
||||||
void WindowScreenCastSource::render(QImage *target)
|
void WindowScreenCastSource::render(QImage *target)
|
||||||
{
|
{
|
||||||
const auto offscreenTexture = GLTexture::allocate(GL_RGBA8, textureSize());
|
const auto offscreenTexture = GLTexture::allocate(GL_RGBA8, target->size());
|
||||||
if (!offscreenTexture) {
|
if (!offscreenTexture) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue