Make the render loop lazy in order to reduce CPU/GPU usage
With a release build, xfwl4 sits at around 7% of a CPU core on my machine. The GPU is doing a bunch of work too.
The reason is that the render loop schedules a re-render after every frame is drawn, with the goal of presenting a new frame before each vblank (so, rendering happens at the refresh rate). This is often unnecessary, as there will be many frames that will be duplicates of previous frames.
Instead, we should only render when something changes. This means scheduling a new render when a client damages/commits a new buffer, the user moves the pointer, when something about an output changes, etc.
Edited by Brian Tarricone