Hi all,<br><br>I wanted to report a potential bug I have found in cairo that occurs in Xorg when using Intel drivers >=<span class="postbody">2.2.1. In my testing this only occurs on some of my machines, and I haven't been able to track down why it is occurring in cairo. I haven't seen this issue with other Xorg drivers / video cards or earlier intel drivers.<br>
<br></span><span class="postbody">I have also noticed that this issue disappears when I add the following in the drivers section of my xorg.conf:<br>
<br>
</span>Option "NoAccel" "true"<br>
<span class="postbody"><br>
This leads me to believe it has something to do with dri or some other 3D acceleration extension.</span><br><span class="postbody"><br><br>On to the problem:<br><br>In my application, I have a variety of custom gtk/cairo objects to draw components on the screen. Most of these objects also have a background image, placed into a cairo surface, that I scale to fit the widget size. If I leave the background image on a 1:1 scale everything looks appropriate. If I scale the image either smaller or larger, the edges of the image look like they are alpha blended with the widget background color.<br>
<br>I first noticed this issue when I was receiving a 1px line next to any of the scaled surfaces. When I stretch the surface to be several times larger it can be seen that the background color of the widget blends with the surface and is stretched with the image.<br>
<br>I hope that makes sense! It's difficult to describe.<br><br>Essentially my code looks like this (this is stripped out of a few function calls):<br><br>cairo_surface_t *bg_image_surface;<br>bg_image_surface = cairo_image_surface_create_from_png (bg_img);<br>
<br>cairo_t *cr;<br>cr = gdk_cairo_create (widget->window);<br><br>cairo_scale (cr, bg_scale_width, bg_scale_height);<br>cairo_set_source_surface (cr, widget->bg_image_surface, 0, 0);<br>cairo_paint (cr);<br><br><br>
</span><span class="postbody">Right now as a workaround, I'm planning to do the image scaling in a GDKPixbuf and then place the pre-scaled image into the cairo surface. Although this works, it is less than ideal and adds needless complexity to a piece of code that was previously working fine.<br>
<br>If anyone has a suggestion in what I might be doing wrong I'm happy to hear. Also, if this should be reported upstream to the Intel folks I can do that as well. I use Gentoo Linux on my machines, so this could possibly be related to an ABI issue, although after several entire system recompilations the problem still exists.<br>
<br><br>Thanks in advance!<br><br>- Mike Gualtieri<br><br></span>