compositor: remove repaint_data from compositor
The repaint_data is entirely backend specific. Moreover, it is only used by the drm backend, while other backends ignore the repaint data. There will always be only one repaint active, thus, there is no need to pass the repaint data from the outside. The repaint_data breaks with the multi-backend series, which calls repaint begin for all backends to get the repaint_data. The repaint_data of the last backend will then be passed to all other backend. At the moment, this works, because the drm backend is the only backend that implements the begin_repaint call. Another option would be to track the repaint data per backend in the compositor, but actually, it the backend needs to track state across the calls, it's its own responsibility. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
This commit is contained in:
@@ -790,7 +790,7 @@ void
|
||||
drm_plane_reset_state(struct drm_plane *plane);
|
||||
|
||||
void
|
||||
drm_assign_planes(struct weston_output *output_base, void *repaint_data);
|
||||
drm_assign_planes(struct weston_output *output_base);
|
||||
|
||||
bool
|
||||
drm_plane_is_available(struct drm_plane *plane, struct drm_output *output);
|
||||
|
||||
@@ -185,8 +185,7 @@ drm_virtual_output_submit_frame(struct drm_output *output,
|
||||
|
||||
static int
|
||||
drm_virtual_output_repaint(struct weston_output *output_base,
|
||||
pixman_region32_t *damage,
|
||||
void *repaint_data)
|
||||
pixman_region32_t *damage)
|
||||
{
|
||||
struct drm_output_state *state = NULL;
|
||||
struct drm_output *output = to_drm_output(output_base);
|
||||
|
||||
@@ -441,9 +441,7 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
|
||||
}
|
||||
|
||||
static int
|
||||
drm_output_repaint(struct weston_output *output_base,
|
||||
pixman_region32_t *damage,
|
||||
void *repaint_data)
|
||||
drm_output_repaint(struct weston_output *output_base, pixman_region32_t *damage)
|
||||
{
|
||||
struct drm_output *output = to_drm_output(output_base);
|
||||
struct drm_output_state *state = NULL;
|
||||
@@ -610,7 +608,7 @@ finish_frame:
|
||||
* a new pending_state structure to own any output state created by individual
|
||||
* output repaint functions until the repaint is flushed or cancelled.
|
||||
*/
|
||||
static void *
|
||||
static void
|
||||
drm_repaint_begin(struct weston_compositor *compositor)
|
||||
{
|
||||
struct drm_backend *b = to_drm_backend(compositor);
|
||||
@@ -626,8 +624,6 @@ drm_repaint_begin(struct weston_compositor *compositor)
|
||||
drm_debug(b, "%s", dbg);
|
||||
free(dbg);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -640,7 +636,7 @@ drm_repaint_begin(struct weston_compositor *compositor)
|
||||
* state will be freed.
|
||||
*/
|
||||
static int
|
||||
drm_repaint_flush(struct weston_compositor *compositor, void *repaint_data)
|
||||
drm_repaint_flush(struct weston_compositor *compositor)
|
||||
{
|
||||
struct drm_backend *b = to_drm_backend(compositor);
|
||||
struct drm_pending_state *pending_state = b->repaint_data;
|
||||
@@ -663,7 +659,7 @@ drm_repaint_flush(struct weston_compositor *compositor, void *repaint_data)
|
||||
* held across the repaint cycle should be discarded.
|
||||
*/
|
||||
static void
|
||||
drm_repaint_cancel(struct weston_compositor *compositor, void *repaint_data)
|
||||
drm_repaint_cancel(struct weston_compositor *compositor)
|
||||
{
|
||||
struct drm_backend *b = to_drm_backend(compositor);
|
||||
struct drm_pending_state *pending_state = b->repaint_data;
|
||||
|
||||
@@ -889,7 +889,7 @@ err:
|
||||
}
|
||||
|
||||
void
|
||||
drm_assign_planes(struct weston_output *output_base, void *repaint_data)
|
||||
drm_assign_planes(struct weston_output *output_base)
|
||||
{
|
||||
struct drm_backend *b = to_drm_backend(output_base->compositor);
|
||||
struct drm_pending_state *pending_state = b->repaint_data;
|
||||
|
||||
Reference in New Issue
Block a user