mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
qmlglsrc: Handle HiDPI scaling
When calculating the capture framebuffer size, include any device scaling applied to the rendered framebuffer Fixes only capturing part of the window when there is a global scale factor. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3622>
This commit is contained in:
parent
64ec73f313
commit
f3b8f1d5b0
1 changed files with 6 additions and 2 deletions
|
@ -330,8 +330,12 @@ QtGLWindow::getGeometry(int * width, int * height)
|
|||
if (width == NULL || height == NULL)
|
||||
return FALSE;
|
||||
|
||||
*width = this->source->width();
|
||||
*height = this->source->height();
|
||||
double scale = this->source->effectiveDevicePixelRatio();
|
||||
*width = this->source->width() * scale;
|
||||
*height = this->source->height() * scale;
|
||||
|
||||
GST_LOG("Window width %d height %d scale %f", *width, *height,
|
||||
scale);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue