Skip to content

effects: Fix projection matrix logic in OffscreenEffect

Vlad Zahorodnii requested to merge work/zzag/invert-wobbly-windows into master

WindowPaintData contains two projection matrices - screenProjectionMatrix and projectionMatrix. I'm not sure why we have two.

screenProjectionMatrix is initialized by the scene. While projectionMatrix is usually updated by the effects. The two are not in sync.

On the other hand, OffscreenEffect takes into account only screenProjectionMatrix. It means that if a window is transformed by two offscreen effects, the final result is going to be broken because an OffscreenEffect must use the projection matrix specified by another OffscreenEffect, which it doesn't.

This change cleans up projection matrix properties in WindowPaintData, so there's only one projection matrix property. With that, offscreen effects can be properly nested.

BUG: 462876

Merge request reports