[cairo] cairo-1.13 finally opens
Henry (Yu) Song - SISA
henry.song at samsung.com
Thu Sep 5 11:42:38 PDT 2013
Good points on your comments. It is short on test cases on shadow and blur. If you can help on that would be great. The branch is a fork work, sorry about the messy commits. It contains 4 major enhancements: gaussian blur, shadow, glesv3 and glesv2 with GL_ANGLE msaa extensions, pus fix bugs/optimzation here and there.
From: Bryce W. Harrington
Sent: Thursday, September 05, 2013 11:37 AM
To: Henry (Yu) Song - SISA
Cc: cairo at cairographics.org
Subject: Re: [cairo] cairo-1.13 finally opens
On Thu, Sep 05, 2013 at 03:54:43PM +0000, Henry (Yu) Song - SISA wrote:
> 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)
I count about 180 individual patches on this branch (although maybe some
are already merged?) Would the strategy for integrating this branch be
to merge it, and then review and fix any remaining details in master, or
to split the changes up into smaller patchsets for tighter review? Or...?
In any case, I've been tinkering a bit with this branch, and I'd be
happy to help on any grunt work needed here.
> 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
Testing this on gl on a couple systems with MSAA and spans, I find the
performance with cache is pretty good (77fps) for fglrx on ATI. On
Intel HD3000 I am seeing somewhat worse performance with MSAA than
spans. On FOSS -ati it just crashes.
> 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.
The branch looks a bit short on tests and docs, have you given thought
to what might be worth having for that?
More information about the cairo