[cairo] [PATCH 33/39] [OpenVG] return to correct component order for images.

tardyp at gmail.com tardyp at gmail.com
Fri Jul 10 10:02:35 PDT 2009


From: Øyvind Kolås <pippin at gimp.org>

---
 src/cairo-openvg-surface.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/cairo-openvg-surface.c b/src/cairo-openvg-surface.c
index 8768831..2782646 100644
--- a/src/cairo-openvg-surface.c
+++ b/src/cairo-openvg-surface.c
@@ -509,7 +509,7 @@ _cairo_openvg_setup_surface_source (cairo_openvg_surface_t  *vgsurface,
     image->width, image->height, VG_IMAGE_QUALITY_FASTER);
   /* NONALIASED, FASTER, BETTER */
 
-  printf ("image: %ix%i\n", image->width, image->height);
+  /*printf ("image: %ix%i\n", image->width, image->height);*/
 
   data = malloc (image->width * image->height * 4);
 
@@ -522,10 +522,10 @@ _cairo_openvg_setup_surface_source (cairo_openvg_surface_t  *vgsurface,
     int i;
     for (i=0; i<image->width * image->height; i++)
       {
-        data[4*i+0] = image->data[4*i+3];
-        data[4*i+1] = image->data[4*i+0];
-        data[4*i+2] = image->data[4*i+1];
-        data[4*i+3] = image->data[4*i+2];
+        data[4*i+0] = image->data[4*i+2];
+        data[4*i+1] = image->data[4*i+1];
+        data[4*i+2] = image->data[4*i+0];
+        data[4*i+3] = image->data[4*i+3];
       }
   }
 
@@ -750,8 +750,8 @@ _cairo_openvg_surface_paint (void             *asurface,
       if (_cairo_surface_is_meta (spat->surface))
         {
           _cairo_meta_surface_replay (spat->surface, asurface);
+          return CAIRO_STATUS_SUCCESS;
         }
-        return CAIRO_STATUS_SUCCESS;
     }
 
   rv = setup_source (vgsurface, source);
-- 
1.6.0.4



More information about the cairo mailing list