From 0c65b23848257067bb4f6dbc7c2e076211b67aec Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 19 Jan 2022 00:14:51 +0000 Subject: [PATCH] libweston: Move renderer interface to internal header No-one should be implementing an external renderer, so move the interface out of the public header. Signed-off-by: Daniel Stone --- include/libweston/libweston.h | 33 -------------------------------- libweston/libweston-internal.h | 35 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index 18677c19..65c58428 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -974,39 +974,6 @@ struct weston_plane { struct weston_drm_format_array; -struct weston_renderer { - int (*read_pixels)(struct weston_output *output, - pixman_format_code_t format, void *pixels, - uint32_t x, uint32_t y, - uint32_t width, uint32_t height); - void (*repaint_output)(struct weston_output *output, - pixman_region32_t *output_damage); - void (*flush_damage)(struct weston_surface *surface, - struct weston_buffer *buffer); - void (*attach)(struct weston_surface *es, struct weston_buffer *buffer); - void (*destroy)(struct weston_compositor *ec); - - /** See weston_surface_get_content_size() */ - void (*surface_get_content_size)(struct weston_surface *surface, - int *width, int *height); - - /** See weston_surface_copy_content() */ - int (*surface_copy_content)(struct weston_surface *surface, - void *target, size_t size, - int src_x, int src_y, - int width, int height); - - /** See weston_compositor_import_dmabuf() */ - bool (*import_dmabuf)(struct weston_compositor *ec, - struct linux_dmabuf_buffer *buffer); - - const struct weston_drm_format_array * - (*get_supported_formats)(struct weston_compositor *ec); - - bool (*fill_buffer_info)(struct weston_compositor *ec, - struct weston_buffer *buffer); -}; - enum weston_capability { /* backend/renderer supports arbitrary rotation */ WESTON_CAP_ROTATION_ANY = 0x0001, diff --git a/libweston/libweston-internal.h b/libweston/libweston-internal.h index c40ba12c..e6a84942 100644 --- a/libweston/libweston-internal.h +++ b/libweston/libweston-internal.h @@ -43,6 +43,41 @@ #include #include "color.h" +/* compositor <-> renderer interface */ + +struct weston_renderer { + int (*read_pixels)(struct weston_output *output, + pixman_format_code_t format, void *pixels, + uint32_t x, uint32_t y, + uint32_t width, uint32_t height); + void (*repaint_output)(struct weston_output *output, + pixman_region32_t *output_damage); + void (*flush_damage)(struct weston_surface *surface, + struct weston_buffer *buffer); + void (*attach)(struct weston_surface *es, struct weston_buffer *buffer); + void (*destroy)(struct weston_compositor *ec); + + /** See weston_surface_get_content_size() */ + void (*surface_get_content_size)(struct weston_surface *surface, + int *width, int *height); + + /** See weston_surface_copy_content() */ + int (*surface_copy_content)(struct weston_surface *surface, + void *target, size_t size, + int src_x, int src_y, + int width, int height); + + /** See weston_compositor_import_dmabuf() */ + bool (*import_dmabuf)(struct weston_compositor *ec, + struct linux_dmabuf_buffer *buffer); + + const struct weston_drm_format_array * + (*get_supported_formats)(struct weston_compositor *ec); + + bool (*fill_buffer_info)(struct weston_compositor *ec, + struct weston_buffer *buffer); +}; + /* weston_buffer */ void