Blog31.1K views1,835 votes0 replies2,877 following
Stop paying for pixel format conversion with cairo_surface_create_similar
Drawing directly to a window surface can be slow because of per-pixel format conversion. A similar off-screen surface matches the target format, so you draw once and blit once.