If my understanding of what cms means is correct, it would seem that the function cairo_surface_create_similar_with_color_space should not be allowed. A "similar" surface means that it is restricted to a set that can be composited efficiently with the destination, and therefore the color space must be chosen by it.