[PATCH weston 5/7] gl-renderer: add BUFFER_TYPE_SOLID
Pekka Paalanen
ppaalanen at gmail.com
Fri Feb 13 02:02:23 PST 2015
From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Add a new buffer type identifying the solid color contents which do not
have a real buffer.
Solid color surfaces now pretend to have 1x1 pixel content data.
This helps the future surface_get_data_size() implementation.
Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
src/gl-renderer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index bb46acd..022fc79 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -79,6 +79,7 @@ struct gl_output_state {
enum buffer_type {
BUFFER_TYPE_NULL,
+ BUFFER_TYPE_SOLID, /* internal solid color surfaces without a buffer */
BUFFER_TYPE_SHM,
BUFFER_TYPE_EGL
};
@@ -1355,6 +1356,9 @@ gl_renderer_surface_set_color(struct weston_surface *surface,
gs->color[1] = green;
gs->color[2] = blue;
gs->color[3] = alpha;
+ gs->buffer_type = BUFFER_TYPE_SOLID;
+ gs->pitch = 1;
+ gs->height = 1;
gs->shader = &gr->solid_shader;
}
--
2.0.5
More information about the wayland-devel
mailing list