[cairo] cairo-1.13 finally opens

Henry (Yu) Song - SISA henry.song at samsung.com
Thu Sep 5 08:54:43 PDT 2013


Hi, Chris

I have added Guassian blur and shadow support in cairo.  It is available in filters-wip branch from https://github.com/SRA-SiliconValley/cairogles

The gaussian blur and shadow support are available for GL/GLES, image, xcb and quartz backend.

features in filters-wip

1. synced with cairo-1.12.14
2. gaussian blur for gl/gles, image, xcb and quartz backends
3. gl msaa compositor supports GL, GLESv3
4. gl msaa compositor supports GLESv2 with the following three extensions: GL_EXT_multisampled_render_to_texture, GL_IMG_multisampled_render_to_texture, and GL_ANGLE_multisample_framebuffer/GL_ANGLE_framebuffer_blit
5. support both drop shadow and inset shadow for gl/gles, image, xcb and quartz backends
6. support shadow caching
7. support custom shadow (e.g., you can draw arbitrary shadow path)

Few side notes

1. Both drop shadow and inset shadow work correctly with CAIRO_OPERATOR_OVER.  I am not sure what are supposed to be for shadow with other operators,  Once that is cleared, I can certainly make it work
2. The shadow calls start at each backend surface (e.g, cairo-image-surface, cairo-gl-surface, and etc), I would really like to move shadow calls into cairo-surface.c
3. I added a cairo API to allow arbitrary inset shadow path that I am not too happy about it, the API might change later.

Attached please find four examples of shadows (both inset and drop shadow) for image, xcb, gl and gles backends
run like this
"./cairo-xcb-shadow-ring --enable-cache 50" - renders 50 shadowed rings with shadow cache enabled
"./cairo-xcb-shadow-ring --disable-cache 50" - renders 50 shadowed rings with shadow cache disabled.

To run gl/gles sample with msaa compositor, set CAIRO_GL_COMPOSITOR=msaa, set and unset this env to observe performance difference.  You need HD3000/HD4000, mesa 9.1+ to support multisampling.  Otherwise, you can test on amd fglrx or nvidia drivers with glx which also supports MSAA.  No open source radeon or nouveau though.

For cairo-egl-shadow-ring, you need HD3000/Hd4000 with mesa 9.1+ that supports glesv3.  You can configure cairo to support glesv3 - "./configure --prefix=....    --enable-gl=no --enable-egl=yes --enable-glesv2=no --enable-glesv3=yes"

I have other sample codes to demo shadow/blur with paint/stroke/mask/glyph.  Anyone interested, I will provide.  If you are interested in quartz shadow/blur, or interested in shadow in wayland, I will provide as well.

Any comments. patches are extremely welcome.

Thanks

Henry
________________________________________
From: cairo-bounces+hsong=sisa.samsung.com at cairographics.org [cairo-bounces+hsong=sisa.samsung.com at cairographics.org] on behalf of Chris Wilson [chris at chris-wilson.co.uk]
Sent: Thursday, September 05, 2013 8:23 AM
To: cairo at cairographics.org
Subject: [cairo] cairo-1.13 finally opens

But not for long! I've merged the two features that had been posted over
the last 6 months (sorry it has taken so long :(, and I plan to make the
first snapshot relatively quickly, say next w/e (14th September). After
that, fix some more of the known and latent bugs in 1.12, and make sure
the new API in cairo-1.13 is well tested before blessing it with a full
release (say mid-October).

If you do have any other features ready for Cairo, please do post them
now. Otherwise, please check over the device-scale and downscaling work!

As always, have fun with Cairo!
-Chris

--
Chris Wilson, Intel Open Source Technology Centre
--
cairo mailing list
cairo at cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-glx-shadow-ring.c
Type: text/x-csrc
Size: 9012 bytes
Desc: cairo-glx-shadow-ring.c
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130905/cc3d2773/attachment-0004.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-image-shadow-ring.c
Type: text/x-csrc
Size: 9491 bytes
Desc: cairo-image-shadow-ring.c
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130905/cc3d2773/attachment-0005.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-xcb-shadow-ring.c
Type: text/x-csrc
Size: 9369 bytes
Desc: cairo-xcb-shadow-ring.c
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130905/cc3d2773/attachment-0006.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-egl-shadow-ring.c
Type: text/x-csrc
Size: 10318 bytes
Desc: cairo-egl-shadow-ring.c
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130905/cc3d2773/attachment-0007.c>


More information about the cairo mailing list