[cairo] how to substitute CAIRO_CLIP_PATH_IS_BOX ?

Enrico Weigelt, metux IT consult enrico.weigelt at gr13.net
Wed Dec 16 07:03:49 PST 2015

On 16.12.2015 13:45, Chris Wilson wrote:

> This basically was replace by cairo_clip_t managing boxes explicitly.
> However, in this case what you want to convert over to is
> _cairo_clip_get_polygon(). The intention is that we can reduce complex
> clips very often to a single polygon and that even do geometric
> intersection of clip paths with shapes (to avoid the fill overhead of
> rendering multiple passes).

Okay, I see one use of it in i915_surface_paint_with_alpha(). It seems
that we're testing whether the clip is made of boxes - if not, use
an i915-specific function (i915_surface_fill_with_alpha(), which then
seem to use the GPU), otherwise use generic

The interesting question for me now is: how should we do that decision
instead ?

Another user is i915_surface_fill_with_alpha() .. I haven't really
understood, whats going on here, but it seems that we're testing
whether the fill path is is affected by the clip path (or maybe
even equal to it). Could anymore give me some more insights ?


Enrico Weigelt,
metux IT consulting

More information about the cairo mailing list