[cairo] potential bug in cairo relative to intel drivers
Mike Gualtieri
mike.gualtieri at gmail.com
Thu Jul 30 12:08:32 PDT 2009
Carl,
Thanks! I appreciate the help. I should have posted here a few months ago
when I first found the problem!
Your solution worked perfect.
To fix, I replaced these lines:
cairo_scale (cr, width, height);
cairo_set_source_surface (cr, widget->bg_image_surface, 0, 0);
cairo_paint (cr);
With these lines:
cairo_scale (cr, width, height);
cairo_set_source_surface (cr, widget->bg_image_surface, 0, 0);
cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_PAD);
cairo_rectangle(cr, 0, 0, width, height);
cairo_fill(cr);
One thing to note, in my particular case, using cairo_paint worked fine. I
figured I would add the cairo_rectangle & cairo_fill calls anyway, just to
be safe.
If I can be of more help in tracking down this bug I'll lend my assistance.
I'm personally out of ideas except for tracking down the issue to a block of
code based on two versions of the intel drivers, which seems extremely
painful.
Thanks,
Mike
--
On Thu, Jul 30, 2009 at 2:06 PM, Carl Worth <cworth at cworth.org> wrote:
> On Thu, 2009-07-30 at 10:54 -0700, Bill Spitzak wrote:
> > Hate to be a pain about this, but I want to point out that this is yet
> > ANOTHER example that this is in fact NOT what any user expects or wants.
> > They think the driver is broken, in no way do they think it is doing the
> > correct thing!
>
> Yes, Bill. We know that this is a common cause of confusion. I probably
> made a mistake in making EXTEND_NONE the default for surface-based
> patterns, (compare with gradient patterns where EXTEND_PAD is the
> default). If we had EXTEND_PAD as the default, then it would be that
> much easier for people to understand what cairo_paint() does and they
> would be forced to fix their code to do things like
> cairo_rectangle()cairo_fill() even before usiong a non-identity
> transformation.
>
> > I still think Cairo could be changed to do EXTEND_REPEAT and clip with
> > an antialiased polygon and everybody would be happier.
>
> Certainly you mean EXTEND_PAD here, not EXTEND_REPEAT, (since
> EXTEND_REPEAT will give you discontinuities unless your image happens to
> be periodic).
>
> But still, adding an additional stage of compositing to all operations
> would not make me happy at all, (nor anybody else who cares about
> performance).
>
> The operation that people want is available in cairo, it just takes a
> little more typing, (set_extend;rectangle;fill rather than paint), but
> it's the kind of thing that's easy to wrap up as a "draw_image" function
> in whatever environment is calling into cairo.
>
> -Carl
>
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20090730/60e10596/attachment.html
More information about the cairo
mailing list