Cairo, XCB, surfaces: artifacts during resizing

On a Cairo surface, i draw a white background and two red rectangles as placeholders for the scrollbars. This surface fills the window.

If i create the surface with cairo_xcb_surface_create, during the resizing of the window the drawing is ok.

If i create the surface with cairo_image_surface_create_for_data and update the window with xcb_put_image, at some point, during the resizing, when the window is large, the red rectangles’ position isn’t updated anymore, but the white background fills the window readily. After the resizing has finished, the red rectangles are drawn at their right position, anyway.

Any clue as to why the red bars lag? They’re part of the same image after all.

You probably want to ask on the Cairo mailing list.

I made up my mind and replaced xcb_put_image with XCB-SHM API. Now the drawing gets resized smoothly, so it seems the issue is about xcb_put_image 's performance.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.