<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Cairo does not expose all Pixman surface formats"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76438#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Cairo does not expose all Pixman surface formats"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76438">bug 76438</a>
              from <span class="vcard"><a class="email" href="mailto:tal.liron@gmail.com" title="Tal <tal.liron@gmail.com>"> <span class="fn">Tal</span></a>
</span></b>
        <pre>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);</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>