summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pixman/pixman-implementation.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c
index 5884054..2c7de4c 100644
--- a/pixman/pixman-implementation.c
+++ b/pixman/pixman-implementation.c
@@ -380,6 +380,11 @@ _pixman_disabled (const char *name)
return FALSE;
}
+static const pixman_fast_path_t empty_fast_path[] =
+{
+ { PIXMAN_OP_NONE }
+};
+
pixman_implementation_t *
_pixman_choose_implementation (void)
{
@@ -397,5 +402,16 @@ _pixman_choose_implementation (void)
imp = _pixman_implementation_create_noop (imp);
+ if (_pixman_disabled ("wholeops"))
+ {
+ pixman_implementation_t *cur;
+
+ /* Disable all whole-operation paths except the general one,
+ * so that optimized iterators are used as much as possible.
+ */
+ for (cur = imp; cur->fallback; cur = cur->fallback)
+ cur->fast_paths = empty_fast_path;
+ }
+
return imp;
}