[Openchrome-users] XAA SolidFillRect problem with negative x value

Mark Huijgen mark.sf.net
Wed Feb 14 00:23:21 PST 2007


Benno Schulenberg wrote:
> Mark Huijgen wrote:
>> I'll make a screenshot of the glitch and post it (ticket #99]. I
>> think it only happens OO is in a borderless window.
> 
> Even when setting a borderless window (in KDE via right-click on 
> title bar > Advanced > No Border), there's no glitch here.  What 
> style of window decorations are you using?

The windowmanager in use is ion2, OO is compiled without any gnome/kde 
support, but with gtk support. The menu bar background is a gradient 
from left to right and the first 'color block' of this gradient is not 
drawn when the glitch occurs. It only happens when the menu bar is a 
certain width, I think its 1024 in the case of the screenshot. OO draws 
each this gradient with SolidFills like these:
x=-2 y=34 w=19 h=1
x=-2 y=35 w=19 h=1
And so on for multiple y's. So each 'color block' of the gradient is 
build up of lines actually. Then it sets a new color and draws the next 
'color block' of the gradient.

> 
> Could it be that the glitch is somehow caused by the desktop theme?
> 
> (How did you find out, by the way, that OO is using a negative x 
> coordinate for that one piece of background colour?)

By printing a line to the Xorg.0.log in every call to
viaSubsequentSolidFillRect with the values. Because i knew already it 
had something to do with this function. At some point I noticed negative 
x's and thought if I'd correct for that maybe the graphics card doesnt 
ignore the drawing (because thats what it seems to do, ignore a solid 
fill with negative x), and behold the problem went away.

> 
>>> Is this w+=x necessary to fix the glitch?  [...]
>> Well, if you dont modify the w and do modify x you will move the
>> rectangle (shift x coordinate to 0 but dont modify the width).
> 
> Argh.  Yes, you're right, of course.  :|
> 
> Still it seems wrong to modify x and w when no other driver seems to 
> be doing that.  CC'ing Thomas to ask what he thinks.
> 
>   http://openchrome.org/trac/ticket/99

I can try on my intel card if the equivalent function is called with 
negative X's too, the glitch does not occur with the i810 driver. So I'm 
gonna check if that driver/card can handle negative x's by it self. Ill 
report back if I've found something interesting.

Mark Huijgen





More information about the Openchrome-users mailing list