|
|
@ -228,17 +228,21 @@ void ScreenShotEffect::takeScreenShot(ScreenShotWindowData *screenshot)
|
|
|
|
WindowPaintData d;
|
|
|
|
WindowPaintData d;
|
|
|
|
QRectF geometry = window->expandedGeometry();
|
|
|
|
QRectF geometry = window->expandedGeometry();
|
|
|
|
qreal devicePixelRatio = 1;
|
|
|
|
qreal devicePixelRatio = 1;
|
|
|
|
if (window->hasDecoration() && !(screenshot->flags & ScreenShotIncludeDecoration)) {
|
|
|
|
bool includeDecorations = (screenshot->flags & ScreenShotIncludeDecoration);
|
|
|
|
|
|
|
|
bool includeShadow = (screenshot->flags & ScreenShotIncludeShadow);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (window->hasDecoration() && !includeDecorations) {
|
|
|
|
geometry = window->clientGeometry();
|
|
|
|
geometry = window->clientGeometry();
|
|
|
|
}
|
|
|
|
} else if (window->hasDecoration() && !includeShadow) {
|
|
|
|
if (window->hasDecoration() && !(screenshot->flags & ScreenShotIncludeShadow)) {
|
|
|
|
|
|
|
|
geometry = window->frameGeometry();
|
|
|
|
geometry = window->frameGeometry();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (screenshot->flags & ScreenShotNativeResolution) {
|
|
|
|
if (screenshot->flags & ScreenShotNativeResolution) {
|
|
|
|
if (const EffectScreen *screen = window->screen()) {
|
|
|
|
if (const EffectScreen *screen = window->screen()) {
|
|
|
|
devicePixelRatio = screen->devicePixelRatio();
|
|
|
|
devicePixelRatio = screen->devicePixelRatio();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool validTarget = true;
|
|
|
|
bool validTarget = true;
|
|
|
|
std::unique_ptr<GLTexture> offscreenTexture;
|
|
|
|
std::unique_ptr<GLTexture> offscreenTexture;
|
|
|
|
std::unique_ptr<GLFramebuffer> target;
|
|
|
|
std::unique_ptr<GLFramebuffer> target;
|
|
|
|