plugins/screenshot: Round texture size
To prevent window screenshot blurring with fractional scaling
This commit is contained in:
parent
1ca7524853
commit
f4232bc391
1 changed files with 2 additions and 1 deletions
|
@ -243,11 +243,12 @@ void ScreenShotEffect::takeScreenShot(ScreenShotWindowData *screenshot)
|
|||
}
|
||||
}
|
||||
|
||||
const QRect scaledGeometry = snapToPixelGrid(scaledRect(geometry, devicePixelRatio));
|
||||
bool validTarget = true;
|
||||
std::unique_ptr<GLTexture> offscreenTexture;
|
||||
std::unique_ptr<GLFramebuffer> target;
|
||||
if (effects->isOpenGLCompositing()) {
|
||||
offscreenTexture = GLTexture::allocate(GL_RGBA8, QSizeF(geometry.size() * devicePixelRatio).toSize());
|
||||
offscreenTexture = GLTexture::allocate(GL_RGBA8, scaledGeometry.size());
|
||||
if (!offscreenTexture) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue