<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lib.cairo">
    <title>gmane.comp.lib.cairo</title>
    <link>http://blog.gmane.org/gmane.comp.lib.cairo</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22721"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22720"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22719"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22718"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22717"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22716"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22715"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22714"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22713"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22712"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22711"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22710"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22709"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22708"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22707"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22706"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22705"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22704"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22703"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lib.cairo/22702"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22721">
    <title>[PATCH] gl: fix wrong references of texture in anothergl_ctx</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22721</link>
    <description>&lt;pre&gt;If we do something like following:

cr1 = cairo_create(surf1);
cr2 = cairo_create(surf2);

... draw something to surf1 ...

cairo_set_source_surface(cr2, surf1);
cairo_rectangle(cr2, ..... );
cairo_fill(cr2);

You will find the current code will reference a texture in cr1 gl
context while drawing cr2. Thus it references a null texture and results
to wrong rendering.

This patch severs as fixing this issue(like gl-surface-source test case)
by copying out the texture from cr1, then regenerating a new one to cr2.

Signed-off-by: Yuanhan Liu &amp;lt;yuanhan.liu&amp;lt; at &amp;gt;linux.intel.com&amp;gt;
---
 src/cairo-gl-composite.c        |   77 +++++++++++++++++++++++++++++++++++++--
 src/cairo-gl-glyphs.c           |    3 +-
 src/cairo-gl-private.h          |    4 ++-
 src/cairo-gl-spans-compositor.c |    5 +--
 src/cairo-gl-surface.c          |    7 ++++
 src/cairo-gl-traps-compositor.c |   12 ++----
 6 files changed, 91 insertions(+), 17 deletions(-)

diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index bcf41ec..97c6118 100644
--- a/src/cairo-gl-composite.c
+++ b/src/cairo-gl-composite.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -63,12 +63,83 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _cairo_gl_composite_set_source (cairo_gl_composite_t *setup,
    sample, extents);
 }
 
+static cairo_status_t
+_cairo_gl_composite_set_source_texture_operand (cairo_gl_composite_t *setup,
+cairo_surface_t *src)
+{
+    cairo_gl_context_t *ctx;
+    cairo_gl_surface_t *src_gl_surf = (cairo_gl_surface_t *)src;
+    cairo_status_t status;
+    GLvoid *pixels;
+    GLuint dst_tex;
+    GLint src_tex = src_gl_surf-&amp;gt;operand.texture.tex;
+    int width = src_gl_surf-&amp;gt;width;
+    int height = src_gl_surf-&amp;gt;height;
+    int cpp = src_gl_surf-&amp;gt;cpp;
+    GLenum format = src_gl_surf-&amp;gt;format;
+
+
+    /*
+     * A flush is a need to keep things in order
+     *
+     * FIXME: or we may delay it at the draw time?
+     */
+    cairo_surface_flush(src);
+    cairo_surface_flush(&amp;amp;setup-&amp;gt;dst-&amp;gt;base);
+
+    /* Read the texture from src surface first */
+    status = _cairo_gl_context_acquire(src-&amp;gt;device, &amp;amp;ctx);
+    if (unlikely(status))
+        return status;
+
+    pixels = malloc(width * height * cpp);
+    glBindTexture(ctx-&amp;gt;tex_target, src_tex);
+    glGetTexImage(ctx-&amp;gt;tex_target, 0, format, GL_UNSIGNED_BYTE, pixels);
+    status = _cairo_gl_context_release(ctx, status);
+    if (unlikely(status))
+        return status;
+
+
+    /* regenerate a texture in the dest surface */
+    status = _cairo_gl_context_acquire(setup-&amp;gt;dst-&amp;gt;base.device, &amp;amp;ctx);
+    if (unlikely(status))
+        goto fail;
+
+    glGenTextures(1, &amp;amp;dst_tex);
+    glBindTexture(ctx-&amp;gt;tex_target, dst_tex);
+    glTexParameteri (ctx-&amp;gt;tex_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+    glTexParameteri (ctx-&amp;gt;tex_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    glTexImage2D(ctx-&amp;gt;tex_target, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, pixels);
+
+    _cairo_gl_operand_destroy(&amp;amp;setup-&amp;gt;src);
+    setup-&amp;gt;src = src_gl_surf-&amp;gt;operand;
+    setup-&amp;gt;src.texture.tex = dst_tex;
+
+    status = _cairo_gl_context_release(ctx, status);
+
+fail:
+    free(pixels);
+    return status;
+}
+
 void
 _cairo_gl_composite_set_source_operand (cairo_gl_composite_t *setup,
-const cairo_gl_operand_t *source)
+const cairo_surface_t *src)
 {
-    _cairo_gl_operand_destroy (&amp;amp;setup-&amp;gt;src);
-    _cairo_gl_operand_copy (&amp;amp;setup-&amp;gt;src, source);
+    cairo_gl_operand_t *operand = source_to_operand(src);
+
+    /*
+     * When we try to use a texture from another gl_ctx, we should
+     * handle it in a special way, like extract it from src_gl_ctx,
+     * then remake a texture in dst_gl_ctx.
+     */
+    if ((operand &amp;amp;&amp;amp; operand-&amp;gt;type == CAIRO_GL_OPERAND_TEXTURE) &amp;amp;&amp;amp;
+        (src-&amp;gt;device &amp;amp;&amp;amp; src-&amp;gt;device != setup-&amp;gt;dst-&amp;gt;base.device)) {
+        _cairo_gl_composite_set_source_texture_operand(setup, src);
+    } else {
+        _cairo_gl_operand_destroy (&amp;amp;setup-&amp;gt;src);
+        _cairo_gl_operand_copy (&amp;amp;setup-&amp;gt;src, operand);
+    }
 }
 
 void
diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
index c2660ac..6afced9 100644
--- a/src/cairo-gl-glyphs.c
+++ b/src/cairo-gl-glyphs.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -252,8 +252,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; render_glyphs (cairo_gl_surface_t *dst,
     if (source == NULL) {
     _cairo_gl_composite_set_solid_source (&amp;amp;setup, CAIRO_COLOR_WHITE);
     } else {
-    _cairo_gl_composite_set_source_operand (&amp;amp;setup,
-    source_to_operand (source));
+    _cairo_gl_composite_set_source_operand (&amp;amp;setup, source);
 
     }
 
diff --git a/src/cairo-gl-private.h b/src/cairo-gl-private.h
index eb75cd9..f354c63 100644
--- a/src/cairo-gl-private.h
+++ b/src/cairo-gl-private.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -159,6 +159,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct _cairo_gl_surface {
     cairo_gl_operand_t operand;
 
     int width, height;
+    int cpp;
+    GLenum format;
 
     GLuint tex; /* GL texture object containing our data. */
     GLuint fb; /* GL framebuffer object wrapping our data. */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -506,7 +508,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _cairo_gl_composite_set_solid_source (cairo_gl_composite_t *setup,
 
 cairo_private void
 _cairo_gl_composite_set_source_operand (cairo_gl_composite_t *setup,
-const cairo_gl_operand_t *source);
+const cairo_surface_t *src);
 
 cairo_private cairo_int_status_t
 _cairo_gl_composite_set_mask (cairo_gl_composite_t *setup,
diff --git a/src/cairo-gl-spans-compositor.c b/src/cairo-gl-spans-compositor.c
index 4c5cef6..ae8668f 100644
--- a/src/cairo-gl-spans-compositor.c
+++ b/src/cairo-gl-spans-compositor.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -327,7 +327,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static cairo_int_status_t copy_boxes (void *_dst,
     if (unlikely (status))
         goto FAIL;
 
-    _cairo_gl_composite_set_source_operand (&amp;amp;setup, source_to_operand (src));
+    _cairo_gl_composite_set_source_operand (&amp;amp;setup, src);
     _cairo_gl_operand_translate (&amp;amp;setup.src, -dx, -dy);
 
     status = _cairo_gl_composite_begin (&amp;amp;setup, &amp;amp;ctx);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -382,8 +382,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; composite_boxes (void*_dst,
     if (unlikely (status))
         goto FAIL;
 
-    _cairo_gl_composite_set_source_operand (&amp;amp;setup,
-    src_operand);
+    _cairo_gl_composite_set_source_operand(&amp;amp;setup, abstract_src);
     _cairo_gl_operand_translate (&amp;amp;setup.src, -src_x, -src_y);
 
     _cairo_gl_composite_set_mask_operand (&amp;amp;setup,
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
index c2e9687..494363b 100644
--- a/src/cairo-gl-surface.c
+++ b/src/cairo-gl-surface.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -433,6 +433,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _cairo_gl_surface_create_scratch (cairo_gl_context_t   *ctx,
     cairo_gl_surface_t *surface;
     GLenum format;
     GLuint tex;
+    int cpp;
 
     glGenTextures (1, &amp;amp;tex);
     surface = (cairo_gl_surface_t *)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -454,10 +455,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _cairo_gl_surface_create_scratch (cairo_gl_context_t   *ctx,
 ASSERT_NOT_REACHED;
     case CAIRO_CONTENT_COLOR_ALPHA:
 format = GL_RGBA;
+cpp = 4;
 break;
     case CAIRO_CONTENT_ALPHA:
 /* We want to be trying GL_ALPHA framebuffer objects here. */
 format = GL_RGBA;
+cpp = 4;
 break;
     case CAIRO_CONTENT_COLOR:
 /* GL_RGB is almost what we want here -- sampling 1 alpha when
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -469,12 +472,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _cairo_gl_surface_create_scratch (cairo_gl_context_t   *ctx,
  * channel with 1 when blending.
  */
 format = GL_RGBA;
+cpp = 4;
 break;
     }
 
     glTexImage2D (ctx-&amp;gt;tex_target, 0, format, width, height, 0,
   format, GL_UNSIGNED_BYTE, NULL);
 
+    surface-&amp;gt;format = format;
+    surface-&amp;gt;cpp = cpp;
+
     return &amp;amp;surface-&amp;gt;base;
 }
 
diff --git a/src/cairo-gl-traps-compositor.c b/src/cairo-gl-traps-compositor.c
index 776b74c..b0f5bf8 100644
--- a/src/cairo-gl-traps-compositor.c
+++ b/src/cairo-gl-traps-compositor.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -172,8 +172,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; composite_boxes (void*_dst,
     if (unlikely (status))
         goto FAIL;
 
-    _cairo_gl_composite_set_source_operand (&amp;amp;setup,
-    source_to_operand (abstract_src));
+    _cairo_gl_composite_set_source_operand (&amp;amp;setup, abstract_src);
 
     _cairo_gl_composite_set_mask_operand (&amp;amp;setup,
   source_to_operand (abstract_mask));
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -212,8 +211,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; composite (void*_dst,
     if (unlikely (status))
         goto FAIL;
 
-    _cairo_gl_composite_set_source_operand (&amp;amp;setup,
-    source_to_operand (abstract_src));
+    _cairo_gl_composite_set_source_operand (&amp;amp;setup, abstract_src);
 
     _cairo_gl_composite_set_mask_operand (&amp;amp;setup,
   source_to_operand (abstract_mask));
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -354,8 +352,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; composite_traps (void*_dst,
     if (unlikely (status))
         goto FAIL;
 
-    _cairo_gl_composite_set_source_operand (&amp;amp;setup,
-    source_to_operand (abstract_src));
+    _cairo_gl_composite_set_source_operand (&amp;amp;setup, abstract_src);
     status = traps_to_operand (_dst, extents, antialias, traps, &amp;amp;setup.mask);
     if (unlikely (status))
 goto FAIL;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -451,8 +448,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; composite_tristrip (void*_dst,
     if (unlikely (status))
         goto FAIL;
 
-    _cairo_gl_composite_set_source_operand (&amp;amp;setup,
-    source_to_operand (abstract_src));
+    _cairo_gl_composite_set_source_operand (&amp;amp;setup, abstract_src);
 
     //_cairo_gl_composite_set_mask_surface (&amp;amp;setup, mask, 0, 0);
 
&lt;/pre&gt;</description>
    <dc:creator>Yuanhan Liu</dc:creator>
    <dc:date>2012-05-24T11:37:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22720">
    <title>Re: cairo Digest, Vol 82, Issue 23</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22720</link>
    <description>&lt;pre&gt;

The FAQ explains this pretty well:

http://www.cairographics.org/FAQ/

(See 'How do I paint from one surface to another?')
--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

&lt;/pre&gt;</description>
    <dc:creator>Roger Davis</dc:creator>
    <dc:date>2012-05-23T19:15:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22719">
    <title>Create two surface and copy from one surface to another</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22719</link>
    <description>&lt;pre&gt;Hello everyone,

i would like to know how to create two surfaces.

On the first surface i want to draw circle and ellipse...
On the second surdace i want to draw rectangle.

I would like to copy portion of the second surface to the first surface?

Could someone help me, please, posting a little example of this?

Thank you very much.
--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo&lt;/pre&gt;</description>
    <dc:creator>Davide Calaminici</dc:creator>
    <dc:date>2012-05-23T18:29:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22718">
    <title>Re: [PATCH 2/3] build: Allow autogen-eration on systems without GTK-doc</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22718</link>
    <description>&lt;pre&gt;
Ouch, definitely!
Amended, thank you!

Andrea
--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

&lt;/pre&gt;</description>
    <dc:creator>Andrea Canciani</dc:creator>
    <dc:date>2012-05-23T08:52:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22717">
    <title>Re: [PATCH 2/3] build: Allow autogen-eration on systems without GTK-doc</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22717</link>
    <description>&lt;pre&gt;The commit message is incorrect:
...should *NOT* cause cairo builds...
--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

&lt;/pre&gt;</description>
    <dc:creator>Maarten Bosmans</dc:creator>
    <dc:date>2012-05-23T08:31:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22716">
    <title>Re: Could I use cairo with opengles in android?</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22716</link>
    <description>&lt;pre&gt;
The code in cairo_egl_device_create() is not related to any surface that
you will be using for rendering. Its only purpose is to allow us to make a
valid surface current in order to perform the device initialization.


It shouldn't make a difference in this case: cairo surfaces that are
created by cairo_gl_surface_create() are backed by textures, not by any
type of EGL surface.



I don't know what you are trying to achieve, so this may be way off
base, but is CAIRO_CONTENT_ALPHA what you want here? Perhaps you need
CAIRO_CONTENT_COLOR_ALPHA? Even if you actually need
CAIRO_CONTENT_ALPHA, it's worth trying out a simpler example first to
get a better feeling of what may be wrong.

Also are you sure you are actually painting correctly to the gl surface?

What happens if instead of a gl surface you use, e.g., an image surface?
Do you get any output then?

Thanks,
Alexandros
--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

&lt;/pre&gt;</description>
    <dc:creator>Alexandros Frantzis</dc:creator>
    <dc:date>2012-05-21T09:26:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22715">
    <title>Re: Could I use cairo with opengles in android?</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22715</link>
    <description>&lt;pre&gt;Hi,Henry
i found the implementation  of the  method cairo_egl_device_create(display,
context)
is very strange,as below:
1. init attribs with EGL_WIDTH=1and EGL_HEIGHT=1
2. init config use eglChooseConfig method
3. create EGLSurface use eglCreatePbufferSurface method
4. then use eglMakeCurrent to release
5. last, return as &amp;amp;ctx-&amp;gt;base.base
problems:
1.EGLSurface's width and height both were set to 1
   but the method cairo_gl_surface_create supply two parameters for setting
width and height

another thing, the code i send before
should  set  EGL_SURFACE_TYPE=EGL_PUBUFFER_BIT
not EGL_SURFACE_TYPE=EGL_WINDOW_BIT

but still nothing display in my phone.

2012/5/18 Jihe Wei &amp;lt;jihe.wei&amp;lt; at &amp;gt;gmail.com&amp;gt;

--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo&lt;/pre&gt;</description>
    <dc:creator>Jihe Wei</dc:creator>
    <dc:date>2012-05-21T08:20:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22714">
    <title>How to load a font from a *.ttf file?</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22714</link>
    <description>&lt;pre&gt;Hi,
how can I load a TrueType Font in cairo? I need to render some test on a 
surface (DirectFB backend, but I think that is not relevant), using a 
monospaced font. I tried Pango libraries, but it takes the font from 
FontConfig and I can't properly configure the width an height of the 
font, I can't resize the font to fit in a precise logical extent. Cairo 
scaled font seems to be useful for my purpose, but I don't understand 
how to load a *ttf.
Thank you in advance
Carlo
--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

&lt;/pre&gt;</description>
    <dc:creator>Carlo</dc:creator>
    <dc:date>2012-05-20T14:01:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22713">
    <title>Re: Getting SIGSEGV in pixman</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22713</link>
    <description>&lt;pre&gt;Hi,

19-05-2012 14:16 tarihinde, Chris Wilson wrote:

(Thanks for responding)

I prepared a minimal win32 sample using my compilation of Cairo-1.12.2; 
uploaded here:

http://www.dynaset.org/dogusanh/download/cairotest.zip (1.8MiB)

I've put Code::Blocks project files, configuration files of Cairo and 
pixman in it.

When you resize the frame, program gets SIGSEGV.

PS. To compile 1.12.2 I've added HAVE_UINT64_T compile flag to project; 
otherwise getting compile error in cairo-wideint-private.h around line 
58. There uint64_t used in #if !HAVE UINT64_T block. If one changes them 
to cairo_uint64_t than compilation stops at cairo-time.c around line 
113; "return t.QuadPart;".


--
Regards,
Hakki Dogusan


--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

&lt;/pre&gt;</description>
    <dc:creator>Hakki Dogusan</dc:creator>
    <dc:date>2012-05-20T09:15:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22712">
    <title>Re: Getting SIGSEGV in pixman</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22712</link>
    <description>&lt;pre&gt;
Is there any chance you can produce a small bit of code to reproduce the
error? The on-stack values are within reason, so we need to dig further
into the structures to find where the error occurs. A "bt full" would be
a first step, followed by a p *surface on all the images and surfaces at
various frames.
-Chris

&lt;/pre&gt;</description>
    <dc:creator>Chris Wilson</dc:creator>
    <dc:date>2012-05-19T11:16:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22711">
    <title>Getting SIGSEGV in pixman</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22711</link>
    <description>&lt;pre&gt;Hi,

(WinXP, MinGW (gcc-4.6.2), Cairo-1.12.2, Pixman-0.25.2)

My program runs successfully with Cairo-1.10.2, but getting SIGSEGV with 
1.12.2.

Back trace is as follows:

Debugger name and version: GNU gdb (GDB) 7.4
Program received signal SIGSEGV, Segmentation fault.
At .sdk\pixman\pixman\pixman-fast-path.c:619
 &amp;gt; bt
#0  0x6ea7f29f in fast_composite_over_8888_8888 (imp=0x21c5308, 
info=0x22d608) at .sdk\pixman\pixman\pixman-fast-path.c:619
#1  0x6e9c6ded in pixman_image_composite32 (op=PIXMAN_OP_OVER, 
src=0x21f12b8, mask=0x0, dest=0x21f0d78, src_x=0, src_y=0, mask_x=0, 
mask_y=0, dest_x=0, dest_y=0, width=919, height=10) at 
.sdk\pixman\pixman\pixman.c:712
#2  0x6e93ff68 in composite_boxes (_dst=0x21f0e40, op=CAIRO_OPERATOR_IN, 
abstract_src=0x21f0f88, abstract_mask=0x0, src_x=0, src_y=0, mask_x=0, 
mask_y=0, dst_x=0, dst_y=0, boxes=0x22df90, extents=0x22e240) at 
.sdk\cairo\src\cairo-image-compositor.c:523
#3  0x6e99e608 in composite_aligned_boxes (compositor=0x6ebde060, 
extents=0x22e208, boxes=0x22df90) at 
.sdk\cairo\src\cairo-spans-compositor.c:604
#4  0x6e99ebee in clip_and_composite_boxes (compositor=0x6ebde060, 
extents=0x22e208, boxes=0x22df90) at 
.sdk\cairo\src\cairo-spans-compositor.c:797
#5  0x6e99eeaf in _cairo_spans_compositor_paint (_compositor=0x6ebde060, 
extents=0x22e208) at .sdk\cairo\src\cairo-spans-compositor.c:896
#6  0x6e9ba70d in _cairo_compositor_paint (compositor=0x6ebde060, 
surface=0x21f0e40, op=CAIRO_OPERATOR_OVER, source=0x22e580, 
clip=0x21c2e40) at .sdk\cairo\src\cairo-compositor.c:65
#7  0x6e91f248 in _cairo_image_surface_paint 
(abstract_surface=0x21f0e40, op=CAIRO_OPERATOR_OVER, source=0x22e580, 
clip=0x21c2e40) at .sdk\cairo\src\cairo-image-surface.c:915
#8  0x6e970906 in _cairo_surface_paint (surface=0x21f0e40, 
op=CAIRO_OPERATOR_OVER, source=0x22e580, clip=0x21c2e40) at 
.sdk\cairo\src\cairo-surface.c:1876
#9  0x6e9a22d7 in _cairo_surface_offset_paint (target=0x21f0e40, x=0, 
y=663, op=CAIRO_OPERATOR_OVER, source=0x22e580, clip=0x21b7510) at 
.sdk\cairo\src\cairo-surface-offset.c:85
#10 0x6e95c671 in _cairo_fallback_compositor_paint 
(_compositor=0x6eb8ff44, extents=0x22e708) at 
.sdk\cairo\src\cairo-fallback-compositor.c:58
#11 0x6e9ba70d in _cairo_compositor_paint (compositor=0x6eb8ff44, 
surface=0x21efae0, op=CAIRO_OPERATOR_OVER, source=0x22ea68, clip=0x0) at 
.sdk\cairo\src\cairo-compositor.c:65
#12 0x6e920e82 in _cairo_win32_display_surface_paint (surface=0x21efae0, 
op=CAIRO_OPERATOR_OVER, source=0x22ea68, clip=0x0) at 
.sdk\cairo\src\win32\cairo-win32-display-surface.c:769
#13 0x6e970906 in _cairo_surface_paint (surface=0x21efae0, 
op=CAIRO_OPERATOR_OVER, source=0x22ea68, clip=0x0) at 
.sdk\cairo\src\cairo-surface.c:1876
#14 0x6e955cf4 in _cairo_gstate_fill (gstate=0x21ed208, path=0x21ed36c) 
at .sdk\cairo\src\cairo-gstate.c:1289
#15 0x6e984584 in _cairo_default_context_fill (abstract_cr=0x21ed088) at 
.sdk\cairo\src\cairo-default-context.c:1010
#16 0x6e9a7bd0 in cairo_fill (cr=0x21ed088) at .sdk\cairo\src\cairo.c:2201


Could you help me, please?


--
Regards,
Hakki Dogusan
http://www.dynaset.org/dogusanh/
--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

&lt;/pre&gt;</description>
    <dc:creator>Hakki Dogusan</dc:creator>
    <dc:date>2012-05-19T10:46:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22710">
    <title>Re: Could I use cairo with opengles in android?</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22710</link>
    <description>&lt;pre&gt;Henry,
I try swap buffer before draw and also after, both not work.
notice:my display surface is created by
cairo_image_surface_create_for_data, and the data comes from androidbitmap

Thanks,
Wei


2012/5/18 Henry (Yu) Song - SISA &amp;lt;hsong&amp;lt; at &amp;gt;sisa.samsung.com&amp;gt;

--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo&lt;/pre&gt;</description>
    <dc:creator>Jihe Wei</dc:creator>
    <dc:date>2012-05-19T01:05:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22709">
    <title>Re: Could I use cairo with opengles in android?</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22709</link>
    <description>&lt;pre&gt;Hi, Jihe

Since you have the gl surface as a window surface, you can swap buffer on the surface directly - cairo_gl_surface_swapbuffers (surface).

Henry
________________________________________
From: cairo-bounces+henry.song=samsung.com&amp;lt; at &amp;gt;cairographics.org [cairo-bounces+henry.song=samsung.com&amp;lt; at &amp;gt;cairographics.org] on behalf of Jihe Wei [jihe.wei&amp;lt; at &amp;gt;gmail.com]
Sent: Friday, May 18, 2012 2:54 AM
To: cairo&amp;lt; at &amp;gt;cairographics.org
Subject: [cairo] Could I use cairo with opengles in android?

Hi ,
I wonder where can find some samples show use cairo in android device.
rarely found ,so i try it myself, but seems can't render anything
details as below,
     cairo_surface_t *surface = NULL;
     const EGLint attribs[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_BLUE_SIZE,
            8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_RENDERABLE_TYPE,
            EGL_OPENGL_ES2_BIT, EGL_NONE };
    const EGLint ctx_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };

    EGLint format;
    EGLint numConfigs;
    EGLConfig config;
    EGLContext context;
    EGLint err;

    EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    err = eglGetError();
    LOGE("eglGetDisplay err:%d", err);//return 12288

    eglInitialize(display, 0, 0);
    err = eglGetError();
    LOGE("eglInitialize err:%d", err);//return 12288

    eglChooseConfig(display, attribs, &amp;amp;config, 1, &amp;amp;numConfigs);
    err = eglGetError();
    LOGE("eglChooseConfig err:%d", err);

    eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &amp;amp;format);

    context = eglCreateContext(display, config, EGL_NO_CONTEXT, ctx_attribs);
    err = eglGetError();
    LOGE("eglCreateContext err:%d", err);//return 12288

    cairo_device_t * device = cairo_egl_device_create(display, context);
    cairo_status_t status = cairo_device_status(device);//return success

    surface = cairo_gl_surface_create(device, CAIRO_CONTENT_ALPHA, info-&amp;gt;width,
            info-&amp;gt;height);//return CAIRO_SURFACE_TYPE_GL type

I use another surface to display the result from surface(gl)
    cairo_set_operator(cr_display, CAIRO_OPERATOR_ADD);
    cairo_set_source_surface(cr_display, surface, 0, 0);
    cairo_paint(cr_display);

Who could help to figure out? thx
--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

&lt;/pre&gt;</description>
    <dc:creator>Henry (Yu) Song - SISA</dc:creator>
    <dc:date>2012-05-18T15:40:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22708">
    <title>Could I use cairo with opengles in android?</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22708</link>
    <description>&lt;pre&gt;Hi ,
I wonder where can find some samples show use cairo in android device.
rarely found ,so i try it myself, but seems can't render anything
details as below,
     cairo_surface_t *surface = NULL;
     const EGLint attribs[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_BLUE_SIZE,
            8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_RENDERABLE_TYPE,
            EGL_OPENGL_ES2_BIT, EGL_NONE };
    const EGLint ctx_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE
};

    EGLint format;
    EGLint numConfigs;
    EGLConfig config;
    EGLContext context;
    EGLint err;

    EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    err = eglGetError();
    LOGE("eglGetDisplay err:%d", err);//return 12288

    eglInitialize(display, 0, 0);
    err = eglGetError();
    LOGE("eglInitialize err:%d", err);//return 12288

    eglChooseConfig(display, attribs, &amp;amp;config, 1, &amp;amp;numConfigs);
    err = eglGetError();
    LOGE("eglChooseConfig err:%d", err);

    eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &amp;amp;format);

    context = eglCreateContext(display, config, EGL_NO_CONTEXT,
ctx_attribs);
    err = eglGetError();
    LOGE("eglCreateContext err:%d", err);//return 12288

    cairo_device_t * device = cairo_egl_device_create(display, context);
    cairo_status_t status = cairo_device_status(device);//return success

    surface = cairo_gl_surface_create(device, CAIRO_CONTENT_ALPHA,
info-&amp;gt;width,
            info-&amp;gt;height);//return CAIRO_SURFACE_TYPE_GL type

I use another surface to display the result from surface(gl)
    cairo_set_operator(cr_display, CAIRO_OPERATOR_ADD);
    cairo_set_source_surface(cr_display, surface, 0, 0);
    cairo_paint(cr_display);

Who could help to figure out? thx
--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo&lt;/pre&gt;</description>
    <dc:creator>Jihe Wei</dc:creator>
    <dc:date>2012-05-18T09:54:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22707">
    <title>[PATCH 3/3] quartz: Provide a valid implementation ofmap_to_image</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22707</link>
    <description>&lt;pre&gt;and reuse it to implement acquire_source.

Fixes

cairo-quartz-surface.c: In function '_cairo_quartz_surface_map_to_image':
cairo-quartz-surface.c:1568: warning: return from incompatible pointer type
cairo-quartz-surface.c:1576: warning: return from incompatible pointer type
---
 src/cairo-quartz-surface.c |  203 +++++++++++++++----------------------------
 1 files changed, 71 insertions(+), 132 deletions(-)

diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 994b92f..7c8c453 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -43,7 +43,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "cairo-compositor-private.h"
 #include "cairo-default-context-private.h"
 #include "cairo-error-private.h"
-#include "cairo-image-surface-private.h"
+#include "cairo-image-surface-inline.h"
 #include "cairo-pattern-private.h"
 #include "cairo-surface-backend-private.h"
 #include "cairo-surface-clipper-private.h"
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1386,96 +1386,82 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _cairo_quartz_draw_source (cairo_quartz_drawing_state_t *state,
     }
 }
 
-/*
- * get source/dest image implementation
- */
-
-/* Read the image from the surface's front buffer */
-static cairo_int_status_t
-_cairo_quartz_get_image (cairo_quartz_surface_t *surface,
- cairo_image_surface_t **image_out)
+static cairo_image_surface_t *
+_cairo_quartz_surface_map_to_image (void *abstract_surface,
+    const cairo_rectangle_int_t *extents)
 {
-    unsigned char *imageData;
-    cairo_image_surface_t *isurf;
+    cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
+    unsigned int stride, bitinfo, bpp, color_comps;
+    CGColorSpaceRef colorspace;
+    void *imageData;
+    cairo_format_t format;
 
-    if (IS_EMPTY (surface)) {
-*image_out = (cairo_image_surface_t*) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0);
-return CAIRO_STATUS_SUCCESS;
-    }
+    if (surface-&amp;gt;imageSurfaceEquiv)
+return _cairo_surface_map_to_image (surface-&amp;gt;imageSurfaceEquiv, extents);
 
-    if (surface-&amp;gt;imageSurfaceEquiv) {
-*image_out = (cairo_image_surface_t*) cairo_surface_reference (surface-&amp;gt;imageSurfaceEquiv);
-return CAIRO_STATUS_SUCCESS;
-    }
+    if (IS_EMPTY (surface))
+return (cairo_image_surface_t *) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0);
 
-    if (_cairo_quartz_is_cgcontext_bitmap_context (surface-&amp;gt;cgContext)) {
-unsigned int stride;
-unsigned int bitinfo;
-unsigned int bpc, bpp;
-CGColorSpaceRef colorspace;
-unsigned int color_comps;
+    if (! _cairo_quartz_is_cgcontext_bitmap_context (surface-&amp;gt;cgContext))
+return _cairo_image_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
 
-imageData = (unsigned char *) CGBitmapContextGetData (surface-&amp;gt;cgContext);
+    bitinfo = CGBitmapContextGetBitmapInfo (surface-&amp;gt;cgContext);
+    bpp = CGBitmapContextGetBitsPerPixel (surface-&amp;gt;cgContext);
 
-bitinfo = CGBitmapContextGetBitmapInfo (surface-&amp;gt;cgContext);
-stride = CGBitmapContextGetBytesPerRow (surface-&amp;gt;cgContext);
-bpp = CGBitmapContextGetBitsPerPixel (surface-&amp;gt;cgContext);
-bpc = CGBitmapContextGetBitsPerComponent (surface-&amp;gt;cgContext);
+    // let's hope they don't add YUV under us
+    colorspace = CGBitmapContextGetColorSpace (surface-&amp;gt;cgContext);
+    color_comps = CGColorSpaceGetNumberOfComponents (colorspace);
 
-// let's hope they don't add YUV under us
-colorspace = CGBitmapContextGetColorSpace (surface-&amp;gt;cgContext);
-color_comps = CGColorSpaceGetNumberOfComponents (colorspace);
+    /* XXX TODO: We can handle many more data formats by
+     * converting to pixman_format_t */
 
-// XXX TODO: We can handle all of these by converting to
-// pixman masks, including non-native-endian masks
-if (bpc != 8)
-    return CAIRO_INT_STATUS_UNSUPPORTED;
+    if (bpp == 32 &amp;amp;&amp;amp; color_comps == 3 &amp;amp;&amp;amp;
+(bitinfo &amp;amp; kCGBitmapAlphaInfoMask) == kCGImageAlphaPremultipliedFirst &amp;amp;&amp;amp;
+(bitinfo &amp;amp; kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Host)
+    {
+format = CAIRO_FORMAT_ARGB32;
+    }
+    else if (bpp == 32 &amp;amp;&amp;amp; color_comps == 3 &amp;amp;&amp;amp;
+     (bitinfo &amp;amp; kCGBitmapAlphaInfoMask) == kCGImageAlphaNoneSkipFirst &amp;amp;&amp;amp;
+     (bitinfo &amp;amp; kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Host)
+    {
+format = CAIRO_FORMAT_RGB24;
+    }
+    else if (bpp == 8 &amp;amp;&amp;amp; color_comps == 1)
+    {
+format = CAIRO_FORMAT_A1;
+    }
+    else
+    {
+return _cairo_image_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
+    }
 
-if (bpp != 32 &amp;amp;&amp;amp; bpp != 8)
-    return CAIRO_INT_STATUS_UNSUPPORTED;
+    imageData = CGBitmapContextGetData (surface-&amp;gt;cgContext);
+    stride = CGBitmapContextGetBytesPerRow (surface-&amp;gt;cgContext);
 
-if (color_comps != 3 &amp;amp;&amp;amp; color_comps != 1)
-    return CAIRO_INT_STATUS_UNSUPPORTED;
+    return (cairo_image_surface_t *) cairo_image_surface_create_for_data (imageData,
+  format,
+  extents-&amp;gt;width,
+  extents-&amp;gt;height,
+  stride);
+}
 
-if (bpp == 32 &amp;amp;&amp;amp; color_comps == 3 &amp;amp;&amp;amp;
-    (bitinfo &amp;amp; kCGBitmapAlphaInfoMask) == kCGImageAlphaPremultipliedFirst &amp;amp;&amp;amp;
-    (bitinfo &amp;amp; kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Host)
-{
-    isurf = (cairo_image_surface_t *)
-cairo_image_surface_create_for_data (imageData,
-     CAIRO_FORMAT_ARGB32,
-     surface-&amp;gt;extents.width,
-     surface-&amp;gt;extents.height,
-     stride);
-} else if (bpp == 32 &amp;amp;&amp;amp; color_comps == 3 &amp;amp;&amp;amp;
-   (bitinfo &amp;amp; kCGBitmapAlphaInfoMask) == kCGImageAlphaNoneSkipFirst &amp;amp;&amp;amp;
-   (bitinfo &amp;amp; kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Host)
-{
-    isurf = (cairo_image_surface_t *)
-cairo_image_surface_create_for_data (imageData,
-     CAIRO_FORMAT_RGB24,
-     surface-&amp;gt;extents.width,
-     surface-&amp;gt;extents.height,
-     stride);
-} else if (bpp == 8 &amp;amp;&amp;amp; color_comps == 1)
-{
-    isurf = (cairo_image_surface_t *)
-cairo_image_surface_create_for_data (imageData,
-     CAIRO_FORMAT_A8,
-     surface-&amp;gt;extents.width,
-     surface-&amp;gt;extents.height,
-     stride);
-} else {
-    return CAIRO_INT_STATUS_UNSUPPORTED;
-}
-    } else {
-return CAIRO_INT_STATUS_UNSUPPORTED;
-    }
+static cairo_int_status_t
+_cairo_quartz_surface_unmap_image (void *abstract_surface,
+   cairo_image_surface_t *image)
+{
+    cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
+
+    if (surface-&amp;gt;imageSurfaceEquiv)
+return _cairo_surface_unmap_image (surface-&amp;gt;imageSurfaceEquiv, image);
+
+    cairo_surface_finish (&amp;amp;image-&amp;gt;base);
+    cairo_surface_destroy (&amp;amp;image-&amp;gt;base);
 
-    *image_out = isurf;
     return CAIRO_STATUS_SUCCESS;
 }
 
+
 /*
  * Cairo surface backend implementations
  */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1514,35 +1500,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _cairo_quartz_surface_acquire_source_image (void *abstract_surface,
      cairo_image_surface_t **image_out,
      void **image_extra)
 {
-    cairo_int_status_t status;
     cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
 
     //ND ((stderr, "%p _cairo_quartz_surface_acquire_source_image\n", surface));
 
-    status = _cairo_quartz_get_image (surface, image_out);
-    if (unlikely (status))
-return _cairo_error (CAIRO_STATUS_NO_MEMORY);
-
     *image_extra = NULL;
 
-    return CAIRO_STATUS_SUCCESS;
-}
-
-static cairo_surface_t *
-_cairo_quartz_surface_snapshot (void *abstract_surface)
-{
-    cairo_int_status_t status;
-    cairo_quartz_surface_t *surface = abstract_surface;
-    cairo_image_surface_t *image;
-
-    if (surface-&amp;gt;imageSurfaceEquiv)
-return NULL;
-
-    status = _cairo_quartz_get_image (surface, &amp;amp;image);
-    if (unlikely (status))
-        return _cairo_surface_create_in_error (CAIRO_STATUS_NO_MEMORY);
+    *image_out = _cairo_quartz_surface_map_to_image (surface, &amp;amp;surface-&amp;gt;extents);
+    if (unlikely (cairo_surface_status(&amp;amp;(*image_out)-&amp;gt;base))) {
+cairo_surface_destroy (&amp;amp;(*image_out)-&amp;gt;base);
+*image_out = NULL;
+return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+    }
 
-    return &amp;amp;image-&amp;gt;base;
+    return CAIRO_STATUS_SUCCESS;
 }
 
 static void
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1550,39 +1521,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _cairo_quartz_surface_release_source_image (void *abstract_surface,
     cairo_image_surface_t *image,
     void *image_extra)
 {
-    cairo_surface_destroy (&amp;amp;image-&amp;gt;base);
-}
-
-
-static cairo_image_surface_t *
-_cairo_quartz_surface_map_to_image (void *abstract_surface,
-    const cairo_rectangle_int_t *extents)
-{
-    cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
-    cairo_image_surface_t *image;
-    cairo_surface_t *subsurface;
-    cairo_status_t status;
-
-    status = _cairo_quartz_get_image (surface, &amp;amp;image);
-    if (unlikely (status))
-return _cairo_surface_create_in_error (status);
-
-    /* Is this legitimate? shouldn't it return an image surface? */
-    /* XXX: BROKEN! */
-
-    subsurface = _cairo_surface_create_for_rectangle_int (&amp;amp;image-&amp;gt;base, extents);
-    cairo_surface_destroy (&amp;amp;image-&amp;gt;base);
-
-    return subsurface;
-}
-
-static cairo_int_status_t
-_cairo_quartz_surface_unmap_image (void *abstract_surface,
-   cairo_image_surface_t *image)
-{
-    cairo_surface_destroy (&amp;amp;image-&amp;gt;base);
-
-    return CAIRO_STATUS_SUCCESS;
+    _cairo_quartz_surface_unmap_image (abstract_surface, image);
 }
 
 static cairo_surface_t *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2221,7 +2160,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct _cairo_surface_backend cairo_quartz_surface_backend = {
     _cairo_surface_default_source,
     _cairo_quartz_surface_acquire_source_image,
     _cairo_quartz_surface_release_source_image,
-    _cairo_quartz_surface_snapshot,
+    NULL, /* snapshot */
 
     NULL, /* copy_page */
     NULL, /* show_page */
&lt;/pre&gt;</description>
    <dc:creator>Andrea Canciani</dc:creator>
    <dc:date>2012-05-17T20:33:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22706">
    <title>[PATCH 2/3] quartz: Mark surfaces created clear as is_clear</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22706</link>
    <description>&lt;pre&gt;This might provide a speedup when clearing an already clear surface
and is required by cairo_surface_create_similar().

Fixes zero-mask.
---
 src/cairo-quartz-surface.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 832e9fc..994b92f 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2275,6 +2275,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _cairo_quartz_surface_create_internal (CGContextRef cgContext,
 surface-&amp;gt;cgContext = NULL;
 surface-&amp;gt;cgContextBaseCTM = CGAffineTransformIdentity;
 surface-&amp;gt;imageData = NULL;
+surface-&amp;gt;base.is_clear = TRUE;
 return surface;
     }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2438,6 +2439,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; cairo_quartz_surface_create (cairo_format_t format,
 return &amp;amp;surf-&amp;gt;base;
     }
 
+    surf-&amp;gt;base.is_clear = TRUE;
+
     surf-&amp;gt;imageData = imageData;
     surf-&amp;gt;imageSurfaceEquiv = cairo_image_surface_create_for_data (imageData, format, width, height, stride);
 
&lt;/pre&gt;</description>
    <dc:creator>Andrea Canciani</dc:creator>
    <dc:date>2012-05-17T20:33:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22705">
    <title>[PATCH 1/3] quartz: Silence warning</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22705</link>
    <description>&lt;pre&gt;cairo-quartz-surface.c:177: warning: enumeration value
'CAIRO_FORMAT_RGB30' not handled in switch
---
 src/cairo-quartz-surface.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 422ef06..832e9fc 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -203,8 +203,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; CairoQuartzCreateCGImage (cairo_format_t format,
     break;
 #endif
 
-        case CAIRO_FORMAT_RGB16_565:
-        case CAIRO_FORMAT_INVALID:
+case CAIRO_FORMAT_RGB30:
+case CAIRO_FORMAT_RGB16_565:
+case CAIRO_FORMAT_INVALID:
 default:
     return NULL;
     }
&lt;/pre&gt;</description>
    <dc:creator>Andrea Canciani</dc:creator>
    <dc:date>2012-05-17T20:33:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22704">
    <title>[PATCH 0/3] quartz: Fix breakage</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22704</link>
    <description>&lt;pre&gt;Quartz is currently failing badly because of multiple issues.  This
patchset addresses two minor issues and the incorrect implementation
of map_to_image.

The main thing left to be fixed is unbound surfaces (as sources/masks).

Andrea

--
cairo mailing list
cairo&amp;lt; at &amp;gt;cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

&lt;/pre&gt;</description>
    <dc:creator>Andrea Canciani</dc:creator>
    <dc:date>2012-05-17T20:33:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22703">
    <title>[PATCH 3/3] build: Do not replace existing files</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22703</link>
    <description>&lt;pre&gt;The existing INSTALL file is currently being replaced at every
autogen.sh run with the default one.

This is not desired, because INSTALL contains some cairo-specific
information.
---
 autogen.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index acb23c7..4d113f8 100755
--- a/autogen.sh
+++ b/autogen.sh
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -25,7 +25,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fi
 &amp;gt; src/Makefile.am.features
 touch ChangeLog
 
-autoreconf --force --install --verbose || exit $?
+autoreconf --install --verbose || exit $?
 
 cd $ORIGDIR
 test -n "$NOCONFIGURE" || "$srcdir/configure" "$&amp;lt; at &amp;gt;"
&lt;/pre&gt;</description>
    <dc:creator>Andrea Canciani</dc:creator>
    <dc:date>2012-05-17T20:30:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22702">
    <title>[PATCH 2/3] build: Allow autogen-eration on systems withoutGTK-doc</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22702</link>
    <description>&lt;pre&gt;The autogen.sh script fails if it cannot run gtkdocize. The absence of
this command should cause cairo builds to fail, it should only prevent
the build of its documentation.

Fixes:
*** No GTK-Doc found, please install it ***

on systems without gtkdoc tools.
---
 autogen.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index f085022..acb23c7 100755
--- a/autogen.sh
+++ b/autogen.sh
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -15,8 +15,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fi
 
 GTKDOCIZE=`which gtkdocize`
 if test -z $GTKDOCIZE; then
-        echo "*** No GTK-Doc found, please install it ***"
-        exit 1
+        echo "*** No GTK-Doc found, documentation won't be generated ***"
+else
+        gtkdocize || exit $?
 fi
 
 # create dummy */Makefile.am.features and ChangeLog to make automake happy
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,7 +25,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fi
 &amp;gt; src/Makefile.am.features
 touch ChangeLog
 
-gtkdocize || exit $?
 autoreconf --force --install --verbose || exit $?
 
 cd $ORIGDIR
&lt;/pre&gt;</description>
    <dc:creator>Andrea Canciani</dc:creator>
    <dc:date>2012-05-17T20:30:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lib.cairo/22701">
    <title>[PATCH 1/3] png: Implement conversion of CAIRO_FORMAT_RGB30to string</title>
    <link>http://permalink.gmane.org/gmane.comp.lib.cairo/22701</link>
    <description>&lt;pre&gt;Fixes

png.c:55: warning: enumeration value ‘CAIRO_FORMAT_RGB30’ not handled
in switch
---
 test/png.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/test/png.c b/test/png.c
index e90ac66..3980ddc 100644
--- a/test/png.c
+++ b/test/png.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -57,6 +57,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; format_to_string (cairo_format_t format)
     case CAIRO_FORMAT_A8:     return "a8";
     case CAIRO_FORMAT_RGB16_565:  return "rgb16";
     case CAIRO_FORMAT_RGB24:  return "rgb24";
+    case CAIRO_FORMAT_RGB30:  return "rgb30";
     case CAIRO_FORMAT_ARGB32: return "argb32";
     case CAIRO_FORMAT_INVALID:
     default: return "???";
&lt;/pre&gt;</description>
    <dc:creator>Andrea Canciani</dc:creator>
    <dc:date>2012-05-17T20:30:43</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lib.cairo">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lib.cairo</link>
  </textinput>
</rdf:RDF>

