Move NOP src iterator into noop implementation.
authorSøren Sandmann Pedersen <ssp@redhat.com>
Sat, 23 Apr 2011 14:26:49 +0000 (10:26 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Thu, 19 May 2011 13:46:56 +0000 (13:46 +0000)
The iterator for sources where neither RGB nor ALPHA is needed, really
belongs in the noop implementation.

pixman/pixman-implementation.c
pixman/pixman-noop.c

index 2706ceb..81c740b 100644 (file)
@@ -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
index fc41d7a..cc8dbc9 100644 (file)
@@ -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                               &&