scenes/opengl: Fix clipping with transformed screens
Software-based clipping is naive. It maps the clip region from the global screen coordinates and intersects it with window quads. If the window is transformed, the quads won't be clipped as expected. Unfortunately, the OpenGL scene enables software-based geometry clipping if the screen transformed. It's not clear why it does so, perhaps as a performance optimization? Either way, this produces incorrect results when the screen is scaled. BUG: 440940
This commit is contained in:
parent
242de43737
commit
0f6aa1c4a8
1 changed files with 1 additions and 1 deletions
|
@ -1023,7 +1023,7 @@ void OpenGLWindow::performPaint(int mask, const QRegion ®ion, const WindowPai
|
|||
RenderContext renderContext {
|
||||
.clip = region,
|
||||
.paintData = data,
|
||||
.hardwareClipping = region != infiniteRegion() && (mask & Scene::PAINT_WINDOW_TRANSFORMED) && !(mask & Scene::PAINT_SCREEN_TRANSFORMED),
|
||||
.hardwareClipping = region != infiniteRegion() && ((mask & Scene::PAINT_WINDOW_TRANSFORMED) || (mask & Scene::PAINT_SCREEN_TRANSFORMED)),
|
||||
};
|
||||
|
||||
renderContext.transforms.push(QMatrix4x4());
|
||||
|
|
Loading…
Reference in a new issue