<br><br><div><span class="gmail_quote">On 3/7/07, <b class="gmail_sendername">Daniel Amelang</b> <<a href="mailto:daniel.amelang@gmail.com">daniel.amelang@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 3/7/07, <a href="mailto:leonid.zolotarev@nokia.com">leonid.zolotarev@nokia.com</a> <<a href="mailto:leonid.zolotarev@nokia.com">leonid.zolotarev@nokia.com</a>> wrote:<br>> Hello Daniel,<br><br>Hello Leonid, I hope you don't mind if we take this to the cairo list,
<br>as there's nothing about your questions that are specific to me. Also,<br>it would be advantageous to get other's help on this, too. And others<br>might benefit from the answer given.<br><br>> I work for Maemo project and currently we are suffering from some severe
<br>> performance issues related to Cairo library.<br>> We manage to identify two most severe issues which affect the Cairo<br>> performance on Maemo platform:<br>><br>> 1. 'cairo_xlib_surface_backend - paint' function implementation is missing
<br>> and Cairo does composite fallback for each paint operation because of that.<br><br>This is a red herring. The fact that the xlib surface doesn't<br>implement "paint" does _not_ mean that it falls back to pixman
<br>compositing. The actual compositing is done by the surface's<br>composite_trapezoids function, which _is_ implemented by the xlib<br>surface. So, nothing to worry about here, really.</blockquote><div><br>cairo-xlib-surface.c
:1628->_cairo_xlib_surface_composite_trapezoids->XRenderComposite<br>Actually all our problems in non optimized XRenderComposite, ..... :(,<br>it is related to our 16 bit color format.....,<br>and we have no processor MMX support, that can help in fbComposite functionality...
<br><br>Even if it works with _cairo_xlib_surface_composite_trapezoids, we probably still using slow XRenderComposite... for Images with 32/24 color depth<br>(Images - our main problem)<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> 2. Cairo does not support 16 bit color bitmaps natively and composite<br>> operation is very slow because it shall convert from 32/24 to 16 all the<br>> time.<br>> You can find more details on these issues from the following bug report:
<br>> <a href="https://bugs.freedesktop.org/show_bug.cgi?id=10208">https://bugs.freedesktop.org/show_bug.cgi?id=10208</a><br><br>First off, do you really have to recomposite at each scroll step? Are</blockquote><div><br>
No, we don't, but cairo doing Xrender(pixman)Composite for each scrolling step, if our visible surface contain any Images with alpha channel... even without alpha it should to do Composite operation from 24 -> 16...
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">the two layers that are composited together changing position relative<br>to one another? If not, try caching the results of the compositing
<br>onto one surface and just scroll that surface.</blockquote><div><br>Yep!, now we are trying to do some workaround for it.... where it should be done? in cairo_image_surface? or at least in cairo...., xlib... ? <br></div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Now, assuming you do have to recomposite at each scroll step, you can<br>try making the two surfaces of the same type (it looks like you're
<br>mixing an image surface with an xlib one, is that right?</blockquote><div><br>maybe, destination surface depth, defined according to our real device depth...<br>probably we can create destination surface with the same (fake) depth, and make composite operations more simple?
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Or are you<br>using the deprecated CAIRO_FORMAT_RGB16_565 format?).<br><br>In other words, try creating two image surfaces and doing your
<br>compositing on those. Or, turn your image into an xlib surface (this<br>is the "right" thing to do, BTW), so you have two xlib surfaces and<br>then cairo will push the compositing down into the (theoretically
<br>optimized) X Render implementation for the device.</blockquote><div><br>Our Xrender composite implementation in our xserver - exactly the same as in pixman->fbcompose.c....<br>and our XrenderComposite operations works with the same CPU usage, but on xserver side :(
<br></div><br><br>Br, Oleg<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> Could you, please, help us to resolve at least the first issue because this
<br>> is something that affect the Cairo performance most of all?<br>><br>> I'd also appreciate if you provide us with some guidelines on the second<br>> issue as well.<br><br>Hope that helps.<br><br>><br>
> Regards,<br>> Leonid.<br><br>Dan<br>_______________________________________________<br>cairo mailing list<br><a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br><a href="http://cairographics.org/cgi-bin/mailman/listinfo/cairo">
http://cairographics.org/cgi-bin/mailman/listinfo/cairo</a><br></blockquote></div><br>