graphics/cairo fix for 8bpp stuff

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

graphics/cairo fix for 8bpp stuff

Mark Kettenis
Actually, it's not the pixel depth that matters, but the fact that the
code basically assumes that all the world is TrueColor, and that 8bpp
visuals almost never are.

With this, firefix seems to be happy on my iMac with wsfb.

Mark

Index: patches/patch-src_cairo-xlib-surface_c
===================================================================
RCS file: patches/patch-src_cairo-xlib-surface_c
diff -N patches/patch-src_cairo-xlib-surface_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_cairo-xlib-surface_c 13 Dec 2005 20:02:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- src/cairo-xlib-surface.c.orig Mon Oct  3 22:44:43 2005
++++ src/cairo-xlib-surface.c Tue Dec 13 00:37:52 2005
+@@ -528,7 +528,9 @@ _get_image_surface (cairo_xlib_surface_t
+      * that way through the cairo_xlib_surface_create_for_bitmap
+      * function.
+      */
+-    if (surface->visual) {
++    if (surface->visual && surface->visual->red_mask != 0
++ && surface->visual->green_mask != 0 && surface->visual->red_mask != 0)
++    {
+ masks.bpp = ximage->bits_per_pixel;
+ masks.alpha_mask = 0;
+ masks.red_mask = surface->visual->red_mask;

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Matthieu Herrb
Mark Kettenis wrote:
> Actually, it's not the pixel depth that matters, but the fact that the
> code basically assumes that all the world is TrueColor, and that 8bpp
> visuals almost never are.
>
> With this, firefix seems to be happy on my iMac with wsfb.

It seems related to <https://bugs.freedesktop.org/show_bug.cgi?id=5205> no ?
--
Matthieu Herrb

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Mark Kettenis
> Date: Tue, 13 Dec 2005 21:59:25 +0100
> From: Matthieu Herrb <[hidden email]>
>
> Mark Kettenis wrote:
> > Actually, it's not the pixel depth that matters, but the fact that the
> > code basically assumes that all the world is TrueColor, and that 8bpp
> > visuals almost never are.
> >
> > With this, firefix seems to be happy on my iMac with wsfb.
>
> It seems related to <https://bugs.freedesktop.org/show_bug.cgi?id=5205> no ?

Not sure, but it *is* <https://bugs.freedesktop.org/show_bug.cgi?id=4505>.

Mark

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Kurt Miller-3
In reply to this post by Mark Kettenis
On Tuesday 13 December 2005 03:13 pm, Mark Kettenis wrote:
> Actually, it's not the pixel depth that matters, but the fact that
> the code basically assumes that all the world is TrueColor, and that
> 8bpp visuals almost never are.
>
> With this, firefix seems to be happy on my iMac with wsfb.

Hmm, it stops the segfaults but can you read the fonts in something like
gftp or gaim? I can't on my PowerBook G4, with wsfb or using ssh -X at
Depth 8 to anything.

-Kurt

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Theo de Raadt
It is time to ask ourselves how this state of affairs came to be.  Who
commited the stuff that broke so many packages?

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Ian McWilliam

On 14 Dec 2005, at 10:42 AM, Theo de Raadt wrote:

> It is time to ask ourselves how this state of affairs came to be.  Who
> commited the stuff that broke so many packages?
>
>

And why do fixes for broken ports get ignored?



Ian McWilliam



Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Jolan Luff
On Wed, Dec 14, 2005 at 12:51:17PM +1100, Ian McWilliam wrote:
>
> On 14 Dec 2005, at 10:42 AM, Theo de Raadt wrote:
>
> >It is time to ask ourselves how this state of affairs came to be.  Who
> >commited the stuff that broke so many packages?
> >
> >
>
> And why do fixes for broken ports get ignored?

can you be more specific?  like examples with links to mailing list
archives...

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Ian McWilliam

On 14 Dec 2005, at 12:59 PM, Jolan Luff wrote:

> On Wed, Dec 14, 2005 at 12:51:17PM +1100, Ian McWilliam wrote:
>>
>> On 14 Dec 2005, at 10:42 AM, Theo de Raadt wrote:
>>
>>> It is time to ask ourselves how this state of affairs came to  
>>> be.  Who
>>> commited the stuff that broke so many packages?
>>>
>>>
>>
>> And why do fixes for broken ports get ignored?
>
> can you be more specific?  like examples with links to mailing list
> archives...
>

OK start with these two.

http://marc.theaimsgroup.com/?l=openbsd-ports&m=113314195505905&w=2

akpop3d - had some users screaming for help.

http://marc.theaimsgroup.com/?l=openbsd-ports&m=113222907802512&w=2

pear php4 - this one stops anyone , (and it's a real nice show  
stopper! as it tries to recompile the entire php4 port from scratch  
and winds up failing anyway) like myself from creating pear ports,  
like when I was creating a pear Logging port to work with the openbsd  
ports tree.

I'm sure there are others, and having an unbroken ports tree in spots  
would be nice.


Ian McWilliam



Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Jolan Luff
On Wed, Dec 14, 2005 at 04:31:31PM +1100, Ian McWilliam wrote:

>
> On 14 Dec 2005, at 12:59 PM, Jolan Luff wrote:
>
> >On Wed, Dec 14, 2005 at 12:51:17PM +1100, Ian McWilliam wrote:
> >>
> >>On 14 Dec 2005, at 10:42 AM, Theo de Raadt wrote:
> >>
> >>>It is time to ask ourselves how this state of affairs came to  
> >>>be.  Who
> >>>commited the stuff that broke so many packages?
> >>>
> >>>
> >>
> >>And why do fixes for broken ports get ignored?
> >
> >can you be more specific?  like examples with links to mailing list
> >archives...
> >
>
> OK start with these two.
>
> http://marc.theaimsgroup.com/?l=openbsd-ports&m=113314195505905&w=2
>
> akpop3d - had some users screaming for help.

yes, i remember this one.  unfortunately, i stopped following the thread
once naddy@ replied since he had originally imported it and he said he
contacted the maintainer.

> http://marc.theaimsgroup.com/?l=openbsd-ports&m=113222907802512&w=2
>
> pear php4 - this one stops anyone , (and it's a real nice show  
> stopper! as it tries to recompile the entire php4 port from scratch  
> and winds up failing anyway) like myself from creating pear ports,  
> like when I was creating a pear Logging port to work with the openbsd  
> ports tree.

the pear ports that i checked all use php5 so i don't see what the issue
is.  did i miss some pear ports?

> I'm sure there are others, and having an unbroken ports tree in spots  
> would be nice.

well if this happens again please reply to your own mails every few days
in increasingly vulgar language.

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Ian McWilliam

On 14 Dec 2005, at 5:26 PM, Jolan Luff wrote:

> On Wed, Dec 14, 2005 at 04:31:31PM +1100, Ian McWilliam wrote:
>>
>> On 14 Dec 2005, at 12:59 PM, Jolan Luff wrote:
>>
>>> On Wed, Dec 14, 2005 at 12:51:17PM +1100, Ian McWilliam wrote:
>>>>
>>>> On 14 Dec 2005, at 10:42 AM, Theo de Raadt wrote:
>>>>
>>>>> It is time to ask ourselves how this state of affairs came to
>>>>> be.  Who
>>>>> commited the stuff that broke so many packages?
>>>>>
>>>>>
>>>>
>>>> And why do fixes for broken ports get ignored?
>>>
>>> can you be more specific?  like examples with links to mailing list
>>> archives...
>>>
>>
>> OK start with these two.
>>
>> http://marc.theaimsgroup.com/?l=openbsd-ports&m=113314195505905&w=2
>>
>> akpop3d - had some users screaming for help.
>
> yes, i remember this one.  unfortunately, i stopped following the  
> thread
> once naddy@ replied since he had originally imported it and he said he
> contacted the maintainer.
>
>> http://marc.theaimsgroup.com/?l=openbsd-ports&m=113222907802512&w=2
>>
>> pear php4 - this one stops anyone , (and it's a real nice show
>> stopper! as it tries to recompile the entire php4 port from scratch
>> and winds up failing anyway) like myself from creating pear ports,
>> like when I was creating a pear Logging port to work with the openbsd
>> ports tree.
>
> the pear ports that i checked all use php5 so i don't see what the  
> issue
> is.  did i miss some pear ports?
>

Probably not, but there are other applications (no pun intended) in  
the usage of the ports tree than what is currently supported. So for  
those of use needing/requiring to write pear ports against php4, yes  
it's an issue.


>> I'm sure there are others, and having an unbroken ports tree in spots
>> would be nice.
>
> well if this happens again please reply to your own mails every few  
> days
> in increasingly vulgar language.
>

Ian McWilliam



Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Jolan Luff
On Wed, Dec 14, 2005 at 05:39:36PM +1100, Ian McWilliam wrote:

>
> On 14 Dec 2005, at 5:26 PM, Jolan Luff wrote:
>
> >On Wed, Dec 14, 2005 at 04:31:31PM +1100, Ian McWilliam wrote:
> >>
> >>On 14 Dec 2005, at 12:59 PM, Jolan Luff wrote:
> >>
> >>>On Wed, Dec 14, 2005 at 12:51:17PM +1100, Ian McWilliam wrote:
> >>>>
> >>>>On 14 Dec 2005, at 10:42 AM, Theo de Raadt wrote:
> >>>>
> >>>>>It is time to ask ourselves how this state of affairs came to
> >>>>>be.  Who
> >>>>>commited the stuff that broke so many packages?
> >>>>>
> >>>>>
> >>>>
> >>>>And why do fixes for broken ports get ignored?
> >>>
> >>>can you be more specific?  like examples with links to mailing list
> >>>archives...
> >>>
> >>
> >>OK start with these two.
> >>
> >>http://marc.theaimsgroup.com/?l=openbsd-ports&m=113314195505905&w=2
> >>
> >>akpop3d - had some users screaming for help.
> >
> >yes, i remember this one.  unfortunately, i stopped following the  
> >thread
> >once naddy@ replied since he had originally imported it and he said he
> >contacted the maintainer.
> >
> >>http://marc.theaimsgroup.com/?l=openbsd-ports&m=113222907802512&w=2
> >>
> >>pear php4 - this one stops anyone , (and it's a real nice show
> >>stopper! as it tries to recompile the entire php4 port from scratch
> >>and winds up failing anyway) like myself from creating pear ports,
> >>like when I was creating a pear Logging port to work with the openbsd
> >>ports tree.
> >
> >the pear ports that i checked all use php5 so i don't see what the  
> >issue
> >is.  did i miss some pear ports?
> >
>
> Probably not, but there are other applications (no pun intended) in  
> the usage of the ports tree than what is currently supported. So for  
> those of use needing/requiring to write pear ports against php4, yes  
> it's an issue.

i would say copy www/php4 to mystuff and adjust PORTSDIR_PATH then.

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Christian Weisgerber
In reply to this post by Mark Kettenis
Mark Kettenis <[hidden email]> wrote:

> Actually, it's not the pixel depth that matters, but the fact that the
> code basically assumes that all the world is TrueColor, and that 8bpp
> visuals almost never are.
>
> With this, firefix seems to be happy on my iMac with wsfb.

After I can now reproduce this locally (X11 in 8bpp mode plus going
through ssh -X):  This is not a fix.  It prevents the segfault, but
badly screws up the display with other GTK applications.  See
gtk-demo, for instance.

--
Christian "naddy" Weisgerber                          [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Eric Faurot
On 12/15/05, Christian Weisgerber <[hidden email]> wrote:
>
> After I can now reproduce this locally (X11 in 8bpp mode plus going
> through ssh -X):  This is not a fix.  It prevents the segfault, but
> badly screws up the display with other GTK applications.  See
> gtk-demo, for instance.

Could you please test (current cairo, not with the suggested fix) using
"ssh -Y" instead of -X?

Eric.

Reply | Threaded
Open this post in threaded view
|

Re: graphics/cairo fix for 8bpp stuff

Christian Weisgerber
Eric Faurot <[hidden email]> wrote:

> > After I can now reproduce this locally (X11 in 8bpp mode plus going
> > through ssh -X):  This is not a fix.  It prevents the segfault, but
> > badly screws up the display with other GTK applications.  See
> > gtk-demo, for instance.
>
> Could you please test (current cairo, not with the suggested fix) using
> "ssh -Y" instead of -X?

That doesn't reproduce the problem, so it's beside the point.

Kettenis has figured out that what matters is whether you have a
TrueColor/DirectColor visual or not.  Check with xdpyinfo(1).  That
is a problem at least for macppc with X11 on wsfb.  It turns out
not to be a problem for local X11 clients e.g. on my laptop with
the ati driver in 8bpp mode, so depending on the X11 drivers involved
your simply setting your display to 8bpp might not be sufficient
to see the problem.  In that case, the combination of a default
PseudoColor visual in 8bpp *and* limiting the X11 client to untrusted
operations is required.

--
Christian "naddy" Weisgerber                          [hidden email]