[Glamor] [PATCH] Fixed the issue with tray icons not appearing properly in certain cases

Anthony Waters awaters1 at gmail.com
Wed Jan 15 13:20:53 PST 2014


I resent it, I'm not sure why it didn't reply to this one though because I
set the Message-ID field for the reply. I'm new to submitting patches to
mailing lists so I appreciate the help.


On Tue, Jan 14, 2014 at 5:03 PM, Alex Deucher <alexdeucher at gmail.com> wrote:

> On Tue, Jan 14, 2014 at 3:28 PM, Anthony Waters <awaters1 at gmail.com>
> wrote:
> > This patch fixes the issue as described in
> https://bugs.freedesktop.org/show_bug.cgi?id=64738 details about the fix
> can be seen in comment 17
> >
>
> It would be good if you could include the information from comment 17
> in the commit message followed by a link to the bug.  e.g.,
>
> glamor: Fix coordinates handling for composite source/mask pictures
>
> There were actually two issues with the original code I believe, the
> first is that the call to glamor_convert_gradient_picture wasn't
> properly referencing the coordinates of the source/mask pictures.  The
> second, was that the updated references (x_temp/y_temp) were also
> improperly set, they should always be 0 because the temp pictures are
> new ones that start at (0, 0).  The reason it worked in certain cases
> and it didn't in others (notably the tray icons) was due to the
> numbers working out based on the call to glamor_composite.  In the
> cases that it did work extent->x1 would equal x_dest and extent->y1
> would equal y_dest, making it so what was actually passed into
> glamor_convert_gradient_picture and the settings for x_temp/y_temp
> were correct.  However, for the case when extent->x1 wouldn't equal
> x_dest and extent->y1 wouldn't equal y_dest (for example with the tray
> icons) then the wrong parameters get passed into
> glamor_convert_gradient_picture and x_temp/y_temp are set improperly.
>
> Fixes issues with tray icons not appearing properly in certain cases.
>
> Bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=64738
>
> Signed-Off-by: ...
>
>
> Alex
>
>
>
> > ---
> >  src/glamor_render.c | 16 ++++++++--------
> >  1 file changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/src/glamor_render.c b/src/glamor_render.c
> > index 76a571f..21b8085 100644
> > --- a/src/glamor_render.c
> > +++ b/src/glamor_render.c
> > @@ -1590,16 +1590,16 @@ glamor_composite_clipped_region(CARD8 op,
> >                     || source_pixmap->drawable.height != height)))) {
> >                 temp_src =
> >                     glamor_convert_gradient_picture(screen, source,
> > -                                                   extent->x1 +
> x_source - x_dest,
> > -                                                   extent->y1 +
> y_source - y_dest,
> > +                                                   x_source,
> > +                                                   y_source,
> >                                                     width, height);
> >                 if (!temp_src) {
> >                         temp_src = source;
> >                         goto out;
> >                 }
> >                 temp_src_priv =
> glamor_get_pixmap_private((PixmapPtr)(temp_src->pDrawable));
> > -               x_temp_src = - extent->x1 + x_dest;
> > -               y_temp_src = - extent->y1 + y_dest;
> > +               x_temp_src = 0;
> > +               y_temp_src = 0;
> >         }
> >
> >         if (mask
> > @@ -1614,16 +1614,16 @@ glamor_composite_clipped_region(CARD8 op,
> >                  * to do reduce one convertion. */
> >                 temp_mask =
> >                     glamor_convert_gradient_picture(screen, mask,
> > -                                                   extent->x1 + x_mask
> - x_dest,
> > -                                                   extent->y1 + y_mask
> - y_dest,
> > +                                                   x_mask,
> > +                                                   y_mask,
> >                                                     width, height);
> >                 if (!temp_mask) {
> >                         temp_mask = mask;
> >                         goto out;
> >                 }
> >                 temp_mask_priv =
> glamor_get_pixmap_private((PixmapPtr)(temp_mask->pDrawable));
> > -               x_temp_mask = - extent->x1 + x_dest;
> > -               y_temp_mask = - extent->y1 + y_dest;
> > +               x_temp_mask = 0;
> > +               y_temp_mask = 0;
> >         }
> >         /* Do two-pass PictOpOver componentAlpha, until we enable
> >          * dual source color blending.
> > --
> > 1.8.5.2
> >
> > _______________________________________________
> > Glamor mailing list
> > Glamor at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/glamor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/glamor/attachments/20140115/adff42b1/attachment.html>


More information about the Glamor mailing list