[PATCH weston 5/8] pixman-renderer: change repaint_region() arguments
Pekka Paalanen
ppaalanen at gmail.com
Mon Mar 9 03:40:04 PDT 2015
On Fri, 06 Mar 2015 13:42:20 -0600
Derek Foreman <derekf at osg.samsung.com> wrote:
> On 06/03/15 05:04 AM, Pekka Paalanen wrote:
> > From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> >
> > Change the region argument types in repaint_region(), moving the
> > final_region computation to the caller. The caller is in a better
> > position deciding if source_clip is needed or if it can be intersected
> > into the final_region via a simple translation. This avoids
> > surf_region/source_clip implying that the transformation is only a
> > translation.
> >
> > The region_global_to_output() call is also moved into the callers so
> > that repaint_region() would not modify caller-provided data. Modifying
> > caller provided data could be surprising.
> >
> > repaint_region() still cannot handle source_clip, it just ignores it.
> > The situation is the same as before.
> >
> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > ---
> > src/pixman-renderer.c | 59 ++++++++++++++++++++++++++++-----------------------
> > 1 file changed, 33 insertions(+), 26 deletions(-)
> >
> > diff --git a/src/pixman-renderer.c b/src/pixman-renderer.c
> > index ecb4109..2da6a2b 100644
> > --- a/src/pixman-renderer.c
> > +++ b/src/pixman-renderer.c
> > @@ -326,40 +326,32 @@ region_intersect_only_translation(pixman_region32_t *result_global,
> > pixman_region32_intersect(result_global, result_global, global);
> > }
> >
> > +/** Paint an intersected region
> > + *
> > + * \param ev The view to be painted.
> > + * \param output The output being painted.
> > + * \param repaint_output The region to be painted in output coordinates.
> > + * \param source_clip The region of the source image to use, in source image
> > + * coordinates. If NULL, use the whole source image.
> > + * XXX: UNIMPLEMENTED
> > + * \param pixman_op Compositing operator, either SRC or OVER.
> > + */
> > static void
> > repaint_region(struct weston_view *ev, struct weston_output *output,
> > - pixman_region32_t *region, pixman_region32_t *surf_region,
> > - pixman_op_t pixman_op)
> > + pixman_region32_t *repaint_output,
> > + pixman_region32_t *source_clip, pixman_op_t pixman_op)
>
> Why add source clip now and not in the other patch (7/8) that actually
> implements it?
A good call!
It was a left-over from repurposing arguments rather than rewriting
them.
Thanks,
pq
More information about the wayland-devel
mailing list