Summary: | Cairo does not expose all Pixman surface formats | ||
---|---|---|---|
Product: | cairo | Reporter: | Tal <tal.liron> |
Component: | image backend | Assignee: | Chris Wilson <chris> |
Status: | RESOLVED MOVED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | 1.12.16 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Tal
2014-03-21 10:25:18 UTC
My simple patch, for those needing this feature: Edit cairo-image-surface.c, and add the following: cairo_surface_t *cairo_image_surface_create_with_pixman_format(unsigned char *data, pixman_format_code_t pixman_format, int width, int height, int stride) { return _cairo_image_surface_create_with_pixman_format(data, pixman_format, width, height, stride); } An example of calling the newly-exposed API: #include "cairo/cairo.h" #include "pixman.h" cairo_surface_t *cairo_image_surface_create_with_pixman_format(unsigned char *data, pixman_format_code_t pixman_format, int width, int height, int stride); cairo_surface_t *surface = cairo_image_surface_create_with_pixman_format(NULL, PIXMAN_a8b8g8r8, width, height, -1); Patch from 2012 available at (but also look at the following discussion!): http://lists.cairographics.org/archives/cairo/2012-March/022852.html I'm confused as to why exposing the internal APIs is a problem. If it's a matter of hiding Pixman from Cairo users, then these "advanced" features could potentially be enabled by including an extra header file, "cairo/cairopixman.h" or something of the sort. Is there any roadmap for solving this? In the meantime, I have to patch Cairo. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/45. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.