[PATCH 1/3] compositor: Export 3 functions from compositor.c
Kristian Hoegsberg
hoegsberg at gmail.com
Sun Feb 26 11:35:52 PST 2012
On Sun, Feb 26, 2012 at 03:21:36PM +0800, zhiwen.wu at linux.intel.com wrote:
> From: Alex Wu <zhiwen.wu at linux.intel.com>
Looks ok, just one comment below.
Kristian
> This will facilitate the implementation of fullscreen.
> ---
> src/compositor.c | 6 +++---
> src/compositor.h | 10 ++++++++++
> 2 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index b12c583..3467874 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -231,7 +231,7 @@ weston_surface_create(struct weston_compositor *compositor)
> return surface;
> }
>
> -static void
> +WL_EXPORT void
> weston_surface_set_color(struct weston_surface *surface,
> GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
> {
> @@ -596,7 +596,7 @@ weston_compositor_repick(struct weston_compositor *compositor)
> weston_device_repick(&device->input_device, time);
> }
>
> -static void
> +WL_EXPORT void
> weston_surface_unmap(struct weston_surface *surface)
> {
> weston_surface_damage_below(surface);
> @@ -607,7 +607,7 @@ weston_surface_unmap(struct weston_surface *surface)
> weston_compositor_schedule_repaint(surface->compositor);
> }
>
> -static void
> +WL_EXPORT void
> destroy_surface(struct wl_resource *resource)
This is the destroy callback for the wl_surface resource. I know I
use it myself to destroy the fade surface, but if we're going to
export it, instead make a weston_surface_destroy wrapper that takes a
struct weston_surface * and checks that
surface->surface.resource.client == NULL (that is, we're not trying to
destroy a client surface this way).
> {
> struct weston_surface *surface =
> diff --git a/src/compositor.h b/src/compositor.h
> index 881f53c..ff14262 100644
> --- a/src/compositor.h
> +++ b/src/compositor.h
> @@ -507,4 +507,14 @@ struct weston_zoom *
> weston_zoom_run(struct weston_surface *surface, GLfloat start, GLfloat stop,
> weston_zoom_done_func_t done, void *data);
>
> +void
> +weston_surface_set_color(struct weston_surface *surface,
> + GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
> +
> +void
> +weston_surface_unmap(struct weston_surface *surface);
> +
> +void
> +destroy_surface(struct wl_resource *resource);
> +
> #endif
> --
> 1.7.5.4
>
More information about the wayland-devel
mailing list