backends: Handle null views instead of creating dummy views
If view initialization fails then don't add the view, rather than adding a dummy offscreen view. This avoids flooding the log with offscreen frame clock confusion:
Before:
libmutter-WARNING **: 16:14:03.930: Failed to allocate onscreen framebuffer for /dev/dri/card0: Failed to allocate surface
...
Clutter-WARNING **: 16:14:04.703: (../clutter/clutter/clutter-frame-clock.c:379):clutter_frame_clock_notify_presented: code should not be reached
...
Clutter-WARNING **: 16:14:05.028: (../clutter/clutter/clutter-frame-clock.c:379):clutter_frame_clock_notify_presented: code should not be reached
Clutter-WARNING **: 16:14:05.040: (../clutter/clutter/clutter-frame-clock.c:379):clutter_frame_clock_notify_presented: code should not be reached
Clutter-WARNING **: 16:14:05.113: (../clutter/clutter/clutter-frame-clock.c:379):clutter_frame_clock_notify_presented: code should not be reached
...
After:
libmutter-WARNING **: 16:14:46.361: Failed to create view for Lenovo Group Limited 14" on DP-2: Failed to allocate onscreen framebuffer for /dev/dri/card0: Failed to allocate surface
Relates to:
https://launchpad.net/bugs/1967707
#2489
#2295
Edited by Daniel van Vugt