Skip to content

stage: Compute view perspective on init and when parameters changed

Clutter stage used to compute the initial projection using a fixed z translation which wasn't matching the one we computed in calculate_z_translation(). This caused to have a wrong initial projection on startup which was then correctly recomputed only at the first paint.

However, since this calculation doesn't depend on view, but only on viewport size, perspective's fovy and z_near we can safely do this at startup and only when any of those parameters change.

Then we can move the computation out _clutter_stage_maybe_setup_viewport() since the cogl framebuffer viewport sizes aren't affecting this.

Fixes gnome-shell#1639 (closed) !803 (merged)

Merge request reports