[cairo] Slow drawing

Drake Miller kedos.project at gmail.com
Sun Jun 9 16:41:37 PDT 2013


I'm drawing an image in gtk.window drawing event
And it's using a lot of CPU Usage.
Here's my method (Vala):
var img = new Cairo.ImageSurface.from_png("location/image.png");
var pat = new Cairo.Pattern.for_surface(img);
cr.rectangle(0, 0, Screen.get_default().width(),120);
cr.clip ();
When I draw with this method it takes 30% of CPU
Is there anyway faster than this?

Thanks !

More information about the cairo mailing list