diff --git a/src/effects/screenshot/screenshot.cpp b/src/effects/screenshot/screenshot.cpp index 20933d7cfc..3357172e5a 100644 --- a/src/effects/screenshot/screenshot.cpp +++ b/src/effects/screenshot/screenshot.cpp @@ -361,15 +361,10 @@ QImage ScreenShotEffect::blitScreenshot(const QRect &geometry, qreal devicePixel const QSize nativeSize = geometry.size() * devicePixelRatio; if (GLRenderTarget::blitSupported() && !GLPlatform::instance()->isGLES()) { - image = QImage(nativeSize.width(), nativeSize.height(), QImage::Format_ARGB32); GLTexture texture(GL_RGBA8, nativeSize.width(), nativeSize.height()); GLRenderTarget target(texture); target.blitFromFramebuffer(geometry); - // copy content from framebuffer into image - texture.bind(); - glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, - static_cast(image.bits())); - texture.unbind(); + image = texture.toImage(); } else { image = QImage(nativeSize.width(), nativeSize.height(), QImage::Format_ARGB32); glReadPixels(0, 0, nativeSize.width(), nativeSize.height(), GL_RGBA,