[cairo] Dangerous cast between cairo_image_surface_t and cairo_image_source_t

Yannick Poirier contact at yannickpoirier.fr
Tue Apr 16 08:50:01 PDT 2013

In this case it assumes that cairo_image_source_t::is_opaque_solid is never
Anyway, I've found a solution for my problem.


On 16 April 2013 15:54, Chris Wilson <chris at chris-wilson.co.uk> wrote:

> On Tue, Apr 16, 2013 at 03:28:40PM +0200, Yannick Poirier wrote:
> > I'm writting a cairo backend to use some hw acceleration. Basically I'm
> > overloaded cairo_image_surface_t and cairo_image_source_t.
> > I'm facing a crash in one of my functions and this is because of a cast
> > from cairo_image_surface_t to cairo_image_source_t.
> The layout of cairo_image_surface_t and cairo_image_source_t should be
> identical for the common components so that we can indeed pass down
> cairo_image_surface_t into that function and treat it as a
> cairo_image_source_t i.e. the offset of pixman_image_t is identical in
> both structures.
> -Chris
> --
> Chris Wilson, Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130416/6f92c4a7/attachment.html>

More information about the cairo mailing list