Skip to content

scenes/opengl: Calculate item transforms differently

Vlad Zahorodnii requested to merge work/opengl-scene-transform into master

Currently, a vertex coordinate is transformed first, then mapped to the global screen coordinates. This causes a problem if a transform is applied to the top-most item and child items are not at (0, 0). For example, scaled windows may have popping out sub-surfaces, etc.

With this change, the item transforms will be computed differently. For example, if the parent item is transformed, a child's transform will look as follows

[Parent's translation][Parent's transform][Child's translation]

instead of

[Parent's translation][Child's translation][Parent's transform]

In the future, I'd like to get rid of the Item::setTransform() call in OpenGLWindow::performPaint() and have either AnimationEffect or libkwineffects call Item::setTransform().

BUG: 440201

Edited by Vlad Zahorodnii

Merge request reports

Loading