summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2011-04-23 10:26:49 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2011-05-19 13:46:56 +0000
commitdd449a2a8ee1381fdc5297257917bc0786bf0ac4 (patch)
tree6e567d1c0bba2c88721620f6aed113527c3748a8
parentba480882aa465d8414dc8a4472d89d94911af60a (diff)
Move NOP src iterator into noop implementation.
The iterator for sources where neither RGB nor ALPHA is needed, really belongs in the noop implementation.
-rw-r--r--pixman/pixman-implementation.c10
-rw-r--r--pixman/pixman-noop.c5
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 &&