libweston: Remove weston_surface_set_color

Don't do this; instead, create a solid-colour buffer and attach it to
the surface explicitly.

Signed-off-by: Daniel Stone <daniels@collabora.com>
dev
Daniel Stone 3 years ago
parent 4d426ab6b1
commit b5605ccd26
  1. 7
      include/libweston/libweston.h
  2. 8
      libweston/compositor.c
  3. 7
      libweston/noop-renderer.c
  4. 1
      libweston/pixman-renderer.c
  5. 1
      libweston/renderer-gl/gl-renderer.c

@ -929,9 +929,6 @@ struct weston_renderer {
void (*flush_damage)(struct weston_surface *surface,
struct weston_buffer *buffer);
void (*attach)(struct weston_surface *es, struct weston_buffer *buffer);
void (*surface_set_color)(struct weston_surface *surface,
float red, float green,
float blue, float alpha);
void (*destroy)(struct weston_compositor *ec);
/** See weston_surface_get_content_size() */
@ -1977,10 +1974,6 @@ struct weston_view_animation *
weston_slide_run(struct weston_view *view, float start, float stop,
weston_view_animation_done_func_t done, void *data);
void
weston_surface_set_color(struct weston_surface *surface,
float red, float green, float blue, float alpha);
void
weston_surface_destroy(struct weston_surface *surface);

@ -630,14 +630,6 @@ weston_surface_create(struct weston_compositor *compositor)
return surface;
}
WL_EXPORT void
weston_surface_set_color(struct weston_surface *surface,
float red, float green, float blue, float alpha)
{
surface->compositor->renderer->surface_set_color(surface, red, green, blue, alpha);
surface->is_opaque = !(alpha < 1.0);
}
WL_EXPORT void
weston_view_to_global_float(struct weston_view *view,
float sx, float sy, float *x, float *y)

@ -96,12 +96,6 @@ noop_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
buffer->height = height;
}
static void
noop_renderer_surface_set_color(struct weston_surface *surface,
float red, float green, float blue, float alpha)
{
}
static void
noop_renderer_destroy(struct weston_compositor *ec)
{
@ -122,7 +116,6 @@ noop_renderer_init(struct weston_compositor *ec)
renderer->repaint_output = noop_renderer_repaint_output;
renderer->flush_damage = noop_renderer_flush_damage;
renderer->attach = noop_renderer_attach;
renderer->surface_set_color = noop_renderer_surface_set_color;
renderer->destroy = noop_renderer_destroy;
ec->renderer = renderer;

@ -881,7 +881,6 @@ pixman_renderer_init(struct weston_compositor *ec)
renderer->base.repaint_output = pixman_renderer_repaint_output;
renderer->base.flush_damage = pixman_renderer_flush_damage;
renderer->base.attach = pixman_renderer_attach;
renderer->base.surface_set_color = pixman_renderer_surface_set_color;
renderer->base.destroy = pixman_renderer_destroy;
renderer->base.surface_get_content_size =
pixman_renderer_surface_get_content_size;

@ -3733,7 +3733,6 @@ gl_renderer_display_create(struct weston_compositor *ec,
gr->base.repaint_output = gl_renderer_repaint_output;
gr->base.flush_damage = gl_renderer_flush_damage;
gr->base.attach = gl_renderer_attach;
gr->base.surface_set_color = gl_renderer_surface_set_color;
gr->base.destroy = gl_renderer_destroy;
gr->base.surface_get_content_size =
gl_renderer_surface_get_content_size;

Loading…
Cancel
Save