Re: Dangerous cast between cairo_image_surface_t and cairo_image_source_t
Chris Wilson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
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 -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo