noop-render: Allow solid-color buffers

Refactor the buffer-type check slightly so we can handle solid-color
buffers, which we do exactly nothing with.

Signed-off-by: Daniel Stone <daniels@collabora.com>
dev
Daniel Stone 3 years ago
parent d82d74e713
commit 493a4c013e
  1. 9
      libweston/noop-renderer.c

@ -63,7 +63,14 @@ noop_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
if (!buffer) if (!buffer)
return; return;
if (buffer->type != WESTON_BUFFER_SHM) { switch (buffer->type) {
case WESTON_BUFFER_SOLID:
/* no-op, early exit */
return;
case WESTON_BUFFER_SHM:
/* fine */
break;
default:
weston_log("No-op renderer supports only SHM buffers\n"); weston_log("No-op renderer supports only SHM buffers\n");
return; return;
} }

Loading…
Cancel
Save