Re: [patch] gl: create BGRA texture and avoid conversion
Chris Wilson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Feb 01, 2013 at 04:10:40PM +0000, Henry (Yu) Song - SISA wrote: > Hi, Chris > > Thanks for comments. First patch - add _cairo_image_surface_coerce_to_pixman_format(). And as you discovered, not quite what you needed for your task. So I've pushed t c391093f40472c2300f38d0e5857858f85586b60 Author: Chris Wilson <[email protected]> Date: Fri Feb 1 16:31:49 2013 +0000 image: Add a convenience function for creating an image from another's data The GL backend would like to extract a rectangle from another surface and convert it to a different pixel format. The _cairo_image_surface_create_from_image() does that by returning a new image that has the contents of the specified rectangle in the source Which provides cairo_image_surface_t * _cairo_image_surface_create_from_image (cairo_image_surface_t *other, pixman_format_code_t format, int x, int y, int width, int height, int stride); for you to use. Hope this helps, -Chris -- Chris Wilson, Intel Open Source Technology Centre -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo