diff options
author | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2013-09-05 05:22:59 +0300 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2013-09-05 05:27:45 +0300 |
commit | 38754f62586d27f12f64793b7e50a463aa5c0187 (patch) | |
tree | 931975b8619d1da97cd5451003644af4dd9334f6 | |
parent | 5979c05361e4c7f6de386a75f78fcaf167af3354 (diff) |
ssse3: "ssse3_fast" in PIXMAN_DISABLE can disable ssse3 fast paths
This is useful for benchmarking ssse3 fast paths vs. iterators.
-rw-r--r-- | pixman/pixman-ssse3.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pixman/pixman-ssse3.c b/pixman/pixman-ssse3.c index c2eeb3a..d55ef10 100644 --- a/pixman/pixman-ssse3.c +++ b/pixman/pixman-ssse3.c @@ -506,11 +506,20 @@ static const pixman_fast_path_t ssse3_fast_paths[] = { PIXMAN_OP_NONE }, }; +static const pixman_fast_path_t ssse3_empty_fast_paths[] = +{ + { PIXMAN_OP_NONE }, +}; + pixman_implementation_t * _pixman_implementation_create_ssse3 (pixman_implementation_t *fallback) { - pixman_implementation_t *imp = - _pixman_implementation_create (fallback, ssse3_fast_paths); + pixman_implementation_t *imp; + + if (!_pixman_disabled ("ssse3_fast")) + imp = _pixman_implementation_create (fallback, ssse3_fast_paths); + else + imp = _pixman_implementation_create (fallback, ssse3_empty_fast_paths); imp->iter_info = ssse3_iters; |