From dd449a2a8ee1381fdc5297257917bc0786bf0ac4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Sat, 23 Apr 2011 10:26:49 -0400 Subject: [PATCH] Move NOP src iterator into noop implementation. The iterator for sources where neither RGB nor ALPHA is needed, really belongs in the noop implementation. --- pixman/pixman-implementation.c | 10 +--------- pixman/pixman-noop.c | 5 +++++ 2 files changed, 6 insertions(+), 9 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 fc41d7a..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 && -- 2.7.4