cull lines that are not visible
Submitted by Behdad Esfahbod
Link to original bug (#446231)
Description
With recent caching changes to PangoLayout (one pending), we always have line ink rect for free during rendering. With a tiny amount of work it would be possible to avoid rendering lines that will not be visible. One can use cairo_clip_extents() for example...
Not sure at which level it's best to implement. Random points:
-
Unless it's implemented in pango_cairo_renderer_draw_glyphstring(), the GdkPangoRenderer will need to reimplement it. This is becoming annoying enough that I feel like going on and making PangoCairoRenderer public (with almost no public fields).
-
Not sure what should happen say when rendering text to a PDF surface. Are we allowed to cull?
Chris, do you happen to have any ideas? Owen?