compositor-drm: Add key binding to switch from pixman to GL renderer
When running with the pixman renderer, the debug binding 'W'
(mod-shift-space W) will cause the compositor to load gl-renderer.so
and start using it instead of the pixman renderer.
diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index 7a535c7..5e1b396 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -511,6 +511,12 @@
GLint filter;
int i;
+ /* In case of a runtime switch of renderers, we may not have received
+ * an attach for this surface since the switch. In that case we don't
+ * have a valid buffer or a proper shader set up so skip rendering. */
+ if (!gs->shader)
+ return;
+
pixman_region32_init(&repaint);
pixman_region32_intersect(&repaint,
&ev->transform.boundingbox, damage);