[PATCH weston v9 12/62] compositor-drm: Reshuffle drm_output_render
Pekka Paalanen
ppaalanen at gmail.com
Wed Mar 22 12:34:15 UTC 2017
On Fri, 3 Mar 2017 23:05:23 +0000
Daniel Stone <daniels at collabora.com> wrote:
> Call drm_output_render unconditionally, doing an early exit if we're
> already rendering a client buffer on the primary plane, and asserting
> for damage on the way out.
>
> Differential Revision: https://phabricator.freedesktop.org/D1494
>
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
> libweston/compositor-drm.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> index 5a54e29..423bd51 100644
> --- a/libweston/compositor-drm.c
> +++ b/libweston/compositor-drm.c
> @@ -710,6 +710,11 @@ drm_output_render(struct drm_output *output, pixman_region32_t *damage)
> struct weston_compositor *c = output->base.compositor;
> struct drm_backend *b = to_drm_backend(c);
>
> + /* If we already have a client buffer promoted to scanout, then we don't
> + * want to render. */
> + if (output->fb_pending)
> + return;
> +
> if (b->use_pixman)
> drm_output_render_pixman(output, damage);
> else
> @@ -781,8 +786,7 @@ drm_output_repaint(struct weston_output *output_base,
> if (output->disable_pending || output->destroy_pending)
> return -1;
>
> - if (!output->fb_pending)
> - drm_output_render(output, damage);
> + drm_output_render(output, damage);
> if (!output->fb_pending)
> return -1;
>
Hi,
instead of this, my first idea would be to take the following patch and
extend it even further to return the drm_fb out from
drm_output_render() so that drm_output_repaint() can set
output->fb_pending.
Anyway.
What's the talk about asserting for damage? I don't see it. If you can
just remove that sentence, then:
Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170322/b2e6058b/attachment.sig>
More information about the wayland-devel
mailing list