Skip to content

Conversation

@dev2718
Copy link
Contributor

@dev2718 dev2718 commented Mar 29, 2025

Currently, images of large resolutions and tiling patterns render inefficiently.
See the attached ipe file, which is barely usable due to this issue.

tiling_pattern_and_image_test.ipe.zip

Image Rendering

This PR proposes using CAIRO_FILTER_FAST instead of CAIRO_FILTER_GOOD when rendering images inside the UI (but not when exporting). The visual difference is imperceptible (at least for me) and the speedup is drastic.

Tiling Pattern Rendering

Currently, rendering tiling patterns (if they fill a moderately large part of the screen buffer) is painfully slow.
This is due to an apparent issue in cairo. If we do not render the tiling pattern using a repeating texture with resolution 32x32, but, say 512x512, the bottleneck disappears and rendering is orders of magnitudes faster.

To keep file exports stemming from cairo efficient (e.g., svg), only use a larger texture when drawing the ui, not exporting.

@otfried otfried force-pushed the master branch 2 times, most recently from d0b335f to a98414e Compare August 2, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant