Skip to content

Assume default GL pixel store states

Loïc Molinari requested to merge molinari/weston:fix_state_leaks into main

Make sure that functions which modify pixel store states reset modified states to their default values before return. This simplifies the GL renderer and prevents bugs by letting functions assume default states are set.

Every single Weston component (including the frontend) could potentially break the assumption above by changing a pixel store state of the GL renderer's context that's left current after any rendering calls. So this MR assumes that no GL calls happen outside of the GL renderer. The current GL renderer code actually already assumes that because only the states changed somewhere else by the renderer were reset to their default values.

Fixes #928 (closed)

Merge request reports