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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user