Thanks Kilon for the explanation.

Alexandre


On Dec 14, 2013, at 10:56 AM, kilon alios <[email protected]> wrote:

> No cairo is not GPU accelerated , rendering is done by your CPU , but of 
> course the graphic card is the one that display things. 
> 
> here is a detailed explanation -> 
> http://lists.cairographics.org/archives/cairo/2012-October/023609.html
> 
> please note that even in the case of opengl backend I very much disagree that 
> this is true hardware acceleration. What the opengl backend is doing is to 
> render cairo surfaces as opengl textures. So even though the texture 
> themselves are hardware accelerated and will even use the the memory of the 
> GPU the process of rendering to the texture will happen solely on the CPU. So 
> its more like a CPU library trying to be hardware accelerated. 
> 
> But even using the OS backends like Quartz is not quite the same. Because you 
> still call C code and C code is executed by your CPU and that C code suppose 
> to call GPU functions. Opengl speed is for the very reason of shaders meaning 
> that it compiles programs that are run solely on the gpu hence true GPU 
> acceleration.  
> 
> Saying that you should not be experiencing slow downs unless you were doing 
> something really intense. I have seen benchmarks of Cairo and they are 
> blazing fast. Usually slow down are primarily because of bad code. I have 
> seen animation in athens take out 50% of my dual core and others only a 5%. 
> Cant say I am sure what happens under the surface maybe Igor may offer a more 
> detailed look into this. I do feel however that slow speed are 99% to be 
> blamed on Pharo way of rendering things. 
> 
> Something similar happens for browsers, SVG is GPU accelerated, Javascript is 
> super fast but it only takes the slowness of DOM (HTML) itself to bring the 
> whole system on its knees. It only take one slow part to ruin the experience. 
>  I think a solution to this would be to bypass pharo rendering completely, 
> create a new window and render directly to that window running Pharo 
> headless. 
> 
> 
> On Sat, Dec 14, 2013 at 10:58 AM, Alexandre Bergel <[email protected]> 
> wrote:
> Hi!
> 
> I have some random questions about the Cairo binding supported by Athens.
> 
>  - the rendering is done by the graphic card isn’t it?
> 
>  - Once rendered, is the produced bitmap copied by the CPU in Pharo? With 
> Roassal3d, we are facing a problem of performance because there is an 
> unnecessary copy between the graphic card and the Form displayed by Pharo. I 
> guess we have the same problem with Cairo.
> 
>  - Is there an example of clipping in Cairo?
> 
>  - Any idea how efficient the clipping is? I mean, will I gain a lot by not 
> displaying elements located outside the visual part or should I leave the 
> clipping do the job?
> 
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> 
> 
> 
> 
> 

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply via email to