Fix black border around main widget with non-integer scaling

All the other highdpi scaling uses rounding, and not using it here may
offset the compositing by a line.

Task-number: QTBUG-67994
Change-Id: I2f5f328c091d0e85c40b1663e22c82f364df65e5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Allan Sandfeld Jensen 2018-06-05 15:12:57 +02:00
parent a14a943f9a
commit c6b3f4b282

View File

@ -344,7 +344,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
QWindowPrivate::get(window)->lastComposeTime.start();
QOpenGLFunctions *funcs = d_ptr->context->functions();
funcs->glViewport(0, 0, window->width() * window->devicePixelRatio(), window->height() * window->devicePixelRatio());
funcs->glViewport(0, 0, qRound(window->width() * window->devicePixelRatio()), qRound(window->height() * window->devicePixelRatio()));
funcs->glClearColor(0, 0, 0, translucentBackground ? 0 : 1);
funcs->glClear(GL_COLOR_BUFFER_BIT);