[PATCH v2 2/2] x11 backend: add option to use pixman renderer

Kristian Høgsberg hoegsberg at gmail.com
Mon Jan 7 12:45:40 PST 2013


On Mon, Jan 07, 2013 at 10:08:56PM +0300, Vasily Khoruzhick wrote:
> On Mon, Jan 7, 2013 at 9:49 PM, Kristian Høgsberg <hoegsberg at gmail.com> wrote:
> > On Mon, Jan 07, 2013 at 08:39:50PM +0300, Vasily Khoruzhick wrote:
> >> When --use-shm is passed to weston and x11 backend is active,
> >> it will use SHM surfaces with pixman renderer instead of EGL
> >>
> >> Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
> >> ---
> >> v2: - handle missing MIT-SHM extension gracefully (tested with Xnest)
> >>     - follow libc convention of error handling
> >>     - get rid of xcb-aux dependency
> >
> > Looks good, committed.  Is there a reason you don't just use
> > visual_type->depth instead of get_depth_of_visual()?
> 
> There's no depth field in xcb_visualtype_t (libxcb-1.9)

Right, I just realized that depth comes from the other iterator.  I
feel like we should just look it up once and return the visualtype and
depth from the one function, but I wouldn't worry about it.


> > Maybe I'm
> > missing something.  Also, to test the pixman renderer with desktop
> > shell, I have to comment out
> >
> > #define HAVE_CAIRO_EGL 1
> >
> > in config.h, since we don't have a configure option to disable that.
> 
> Probably cairo in archlinux is compiled without EGL support, that's
> why it works for me.

Actually, the better approach is to fall back to shm and sw cairo if
we fail to initialize EGL.  I just committed a small patch to do that
and with that weston --use-pixman now works even if the clients were
compiled with cairo-egl support.

Kristian


More information about the wayland-devel mailing list