backend-drm: improve repaint and commit error handling
Currently, during each repaint, all backends are repainted and errors are handled globally.
This is problematic with multiple backends and multiple devices in the drm backend:
repaint_begin()
/repaint_flush()
may be called even if no output for the backend is repainted
and errors are lost.
To fix this, restructure the repaint logic:
- check which outputs and backends actually require repaints
- repaint each backend separately (if necessary) and handle errors directly
- in the drm backend, handle each device the same way, so that no error is lost.
As a nice side effect, the drm backend no longer fills the log with repaints that don't actually repaint drm outputs.
Edited by Michael Olbrich