[cairo] Cairo and animations

Pietro Incardona asmprog32 at hotmail.com
Wed Dec 24 10:07:35 PST 2008


Doing some benchmarkthe bottleneck is located heree    struct timeb bbb1;    struct timeb bbb2;    double t = 0;    ftime(&bbb1);    cairo_t *cr_pixmap = gdk_cairo_create(pixmap);    cairo_set_source_surface (cr_pixmap, cst, 0, 0);    cairo_paint(cr_pixmap);    cairo_destroy(cr_pixmap);    ftime(&bbb2);    t = (bbb2.time - bbb1.time)  + (double)(bbb2.millitm - bbb1.millitm) / 1000.0;    printf("do_draw bench %f \n",t);need over 1 sec to execute this code when window is maximized----------------------------------------> Date: Wed, 24 Dec 2008 13:47:37 +0100> From: bonzini at gnu.org> To: asmprog32 at hotmail.com> CC: cairo at cairographics.org> Subject: Re: Cairo and animations>> Pietro Incardona wrote:>>>> This is the code ( it draw one rectangle but the result don' t change )>> I haven't looked at it, but probably the culprit is transferring the> window pixels to the screen. When using OpenGL, for example, I have> seen sometimes glTexImage2D taking more time than the rest of the drawing.>> Paolo
_________________________________________________________________
Party… con Eventi! Condividi foto e commenti sulla tua festa!
http://www.microsoft.com/windows/windowslive/events.aspx


More information about the cairo mailing list