Re: [patch] gl: create BGRA texture and avoid conversion

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E434AF56C@sisaex01sj>
Hi, Chris

Thanks a lot on this

Henry
________________________________________
From: [email protected] [[email protected]] on behalf of Chris Wilson [[email protected]]
Sent: Friday, February 01, 2013 8:37 AM
To: Henry (Yu) Song - SISA
Cc: [email protected]
Subject: Re: [cairo] [patch] gl: create BGRA texture and avoid conversion

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
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.