Hi folks,<br><br>I'm working with buildroot (<a href="http://buildroot.org/">http://buildroot.org/</a>) to generate rootfs for embedded systems.<br>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.<br>
<br>Here is the patch : <a href="http://git.buildroot.net/buildroot/tree/package/cairo/cairo-1.6.4-directfb-all.patch">http://git.buildroot.net/buildroot/tree/package/cairo/cairo-1.6.4-directfb-all.patch</a><br><br>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.<br>
<br>Here is the diff after rebasing the patch on top of 1.8.8 (differences on traces has been dropped) :<br><br>diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c<br>index bb02dbf..65f2d55 100644<br>
--- a/src/cairo-directfb-surface.c<br>+++ b/src/cairo-directfb-surface.c<br>@@ -609,6 +609,8 @@ _cairo_directfb_surface_release_dest_image (void *abstract_surf<br> surface->dfbsurface->Blit (surface->dfbsurface,<br>
buffer, NULL,<br> image_rect->x, image_rect->y));<br>+<br>+ surface->dfbsurface->ReleaseSource (surface->dfbsurface);<br>
}<br> <br> cairo_surface_destroy (&image->base);<br>@@ -848,6 +850,9 @@ _directfb_finish_composite (cairo_directfb_surface_t *dst,<br> cairo_surface_attributes_t *src_attr)<br>
{<br> _cairo_pattern_release_surface (src_pattern, src, src_attr);<br>+<br>+ if (dst->dfbsurface)<br>+ dst->dfbsurface->ReleaseSource( dst->dfbsurface );<br> }<br> #endif /* DFB_COMPOSITE || DFB_COMPOSITE_TRAPEZOIDS */<br>
<br>@@ -1555,6 +1560,7 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface,<br> <br> new_cache->dfbsurface->Blit (new_cache->dfbsurface,<br> cache->dfbsurface, NULL, 0, 0);<br>
+ new_cache->dfbsurface->ReleaseSource (new_cache->dfbsurface);<br> <br> _directfb_destroy_font_cache (cache);<br> scaled_font->surface_private = cache = new_cache;<br>@@ -1778,6 +1784,7 @@ _cairo_directfb_surface_show_glyphs (void *abstract_dst,<br>
RUN_CLIPPED (dst, NULL,<br> dst->dfbsurface->BatchBlit (dst->dfbsurface,<br> cache->dfbsurface, rects, points, num));<br>+ dst->dfbsurface->ReleaseSource (dst->dfbsurface);<br>
<br> return CAIRO_STATUS_SUCCESS;<br> }<br><br><br>Does someone know why theses ReleaseSource calls has been added ?<br>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.<br>
<br>If someone has some comment on this, it will be greatly appreciated.<br><br>Regards,<br><br>--<br>Lionel<br>