Skip to content

libview: Do not draw invalid surface

When user zooms too much given document it can happen that the resulting surface is out of size limits of given cairo backend. This usually spreads to the UI of evince itself showing corrupted UI (see the header):

screenshot

This fix checks status of rendered surface for CAIRO_STATUS_INVALID_SIZE in ev_job_render_run() before using it which prevents the UI corruption.

I check just against CAIRO_STATUS_INVALID_SIZE since I'm not 100% sure whether all cairo statuses except CAIRO_STATUS_SUCCESS mean that the resulting surface is not usable.

Merge request reports