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>
This commit is contained in:
parent
d82d74e713
commit
493a4c013e
@ -63,7 +63,14 @@ noop_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
|
||||
if (!buffer)
|
||||
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");
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user