From: Søren Sandmann Pedersen <[email protected]>

The iterator for sources where neither RGB and ALPHA are needed really
belong in the noop implementation.
---
 pixman/pixman-implementation.c |   10 +---------
 pixman/pixman-noop.c           |   11 ++++++++---
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c
index 2706ceb..81c740b 100644
--- a/pixman/pixman-implementation.c
+++ b/pixman/pixman-implementation.c
@@ -260,15 +260,7 @@ _pixman_implementation_src_iter_init 
(pixman_implementation_t      *imp,
     iter->height = height;
     iter->flags = flags;
 
-    if ((flags & (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB)) ==
-            (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB))
-    {
-       iter->get_scanline = _pixman_iter_get_scanline_noop;
-    }
-    else
-    {
-       (*imp->src_iter_init) (imp, iter);
-    }
+    (*imp->src_iter_init) (imp, iter);
 }
 
 void
diff --git a/pixman/pixman-noop.c b/pixman/pixman-noop.c
index 75ecf0b..cc8dbc9 100644
--- a/pixman/pixman-noop.c
+++ b/pixman/pixman-noop.c
@@ -82,6 +82,11 @@ noop_src_iter_init (pixman_implementation_t *imp, 
pixman_iter_t *iter)
     {
        iter->get_scanline = get_scanline_null;
     }
+    else if ((iter->flags & (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB)) ==
+            (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB))
+    {
+       iter->get_scanline = _pixman_iter_get_scanline_noop;
+    }
     else if ((iter->flags & ITER_NARROW)                               &&
             (image->common.flags & FLAGS) == FLAGS                     &&
             iter->x >= 0 && iter->y >= 0                               &&
@@ -106,7 +111,7 @@ noop_dest_iter_init (pixman_implementation_t *imp, 
pixman_iter_t *iter)
     pixman_image_t *image = iter->image;
     uint32_t image_flags = image->common.flags;
     uint32_t iter_flags = iter->flags;
-       
+
     if ((image_flags & FAST_PATH_STD_DEST_FLAGS) == FAST_PATH_STD_DEST_FLAGS   
&&
        (iter_flags & ITER_NARROW) == ITER_NARROW                               
&&
        ((image->common.extended_format_code == PIXMAN_a8r8g8b8)        ||
@@ -114,7 +119,7 @@ noop_dest_iter_init (pixman_implementation_t *imp, 
pixman_iter_t *iter)
          (iter_flags & (ITER_LOCALIZED_ALPHA)))))
     {
        iter->buffer = image->bits.bits + iter->y * image->bits.rowstride + 
iter->x;
-       
+
        iter->get_scanline = _pixman_iter_get_scanline_noop;
        iter->write_back = dest_write_back_direct;
     }
@@ -138,6 +143,6 @@ _pixman_implementation_create_noop (pixman_implementation_t 
*fallback)
 
     imp->src_iter_init = noop_src_iter_init;
     imp->dest_iter_init = noop_dest_iter_init;
-    
+
     return imp;
 }
-- 
1.7.4

_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to