[cairo] Question on DirectFB backend
chris at chris-wilson.co.uk
Fri Nov 20 04:45:23 PST 2009
Excerpts from Lionel Landwerlin's message of Fri Nov 20 09:39:11 +0000 2009:
> Hi folks,
> I'm working with buildroot (http://buildroot.org/) to generate rootfs for
> embedded systems.
> I'm trying to upgrade the current cairo package in buildroot to the 1.8.8
> version. The current package uses cairo-1.6.4 + one patch.
> I reapplied manually the patch and found that most of it has already been
> applied in the 1.8.8 version, some other part has been rewritten and there
> is only one part which bother me.
> Does someone know why theses ReleaseSource calls has been added ?
> I guess this has something to do with the fact that cairo owns a lock on the
> surfaces that requires frequent EngineSync calls when blitting (which slows
> down the hardware acceleration), but I'm not really sure.
The commit that added ReleaseSurface is a good example of the style that we
need to avoid:
Author: Claudio Ciccani <klan at directfb.org>
Date: Mon Dec 10 18:54:01 2007 +0100
[cairo-directfb] Merging from directfb.org
- Improved performance in case of surface conversion: allocate a shadow buffer that can only grow
- Fixed support for small surfaces (less than 8x8)
- Optimize the blending function according to the surface format
- Added _directfb_categorize_operation(): selects the blitting function according to the transform matrix
- Avoid inverting the matrix when doing a simple StretchBlit()
- Use TextureTriangles() instead of StretchBlit() when scale factors are negative
- Added support for ARGB32 fonts (converted to A8 internally)
- Removed unused functions (flush() and mark_dirty_rectangle())
- Code cosmetics
So we have no idea why ReleaseSurface is required.
Lionel, can you give a quick pitch on why I should not simply delete
the directfb backend? From my reading of the code, it will only
attempt to accelerate the simplest of blits and blends [though, that
includes solid glyphs]. Everything else will trigger fallbacks. So is
there any justification for Cairo to continue to have a DirectFB backend?
At the moment I'm radically changing the internal interfaces, that will
reduce the directfb backend to being basically a wrapper around the
image surface, and I'm not sure if that is worth the effort. (The effort
principally be in writing better glyph support.)
Chris Wilson, Intel Open Source Technology Centre
More information about the cairo