[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux-x86-64 and cairo crash

From: Fred Kiefer
Subject: Re: Linux-x86-64 and cairo crash
Date: Tue, 13 Sep 2011 11:06:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv: Gecko/20110907 SUSE/3.1.14 Thunderbird/3.1.14

On 13.09.2011 00:41, Eric Wasylishen wrote:
On 2011-09-12, at 3:48 PM, Fred Kiefer wrote:
On 12.09.2011 21:17, Eric Wasylishen wrote:
Based on what Fred said, it looks like the design of XGCairoXImageSurface is 
flawed and won't work on 16-bit displays. (But did it work for you in the past?)

One thing you could try is switch to XGCairoSurface. In CairoContext.m, just 
adjust the comments so you have:
#    define _CAIRO_SURFACE_CLASSNAME XGCairoSurface

This will create a cairo xlib surface for the window buffer, instead of a cairo 
image surface. Interestingly enough it seems to work for me - I don't think it 
worked a few months ago.

as an aside, I would like to switch to XGCairoSurface by default at some point, 
rather than fixing XGCairoXImageSurface. It would have a number of benefits, 
- enables subpixel antialising for fonts
- removes the need for using shared memory for the window buffer for good 
performance (from what I understand, cairo will automatically use shm to 
transfer bitmaps to the x server when needed).
- it may allow hardware acceleration for some operations?

If I remember correctly the reason we switched to XGCairoXImageSurface was that 
with XGCairoSurface we could not get transparent windows. Yen-Ju of the Etoile 
project suggested to use XGCairoXImageSurface and this has worked remarkably 
well for almost five years now. If transparency works now, even on old 24 bit 
displays, with XGCairoSurface then we should switch back to that. Otherwise we 
need to figure out a better way to determine which surface to use.

Ah, I see. Transparent windows works fine for me with XGCairoSurface now - 
perhaps it was a limitation in cairo that was fixed since then.

btw, I added the test to GSTest that I was meaning to write for a while, for testing 
-[NSWindow setAlphaValue:] and -[NSWindow setBackgroundColor:] for colors with an alpha<  
1. It's called "Transparency-test".

Thank you for this great test. It shows how powerful GNUstep already is in this area. Sadly it also shows that nobody has ever used the alpha slider in the colour panel before, it looks just horrible.

As for transparent windows working with XGCairoSurface, I would not be to surprised to learn that you are using X11 with 32 bit depth. But then, who isn't these times? Maybe we could just live with that limitation, when five years ago this would have excluded almost everybody.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]