diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-05 09:46:00 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-08 13:07:11 +0100 |
commit | 790e7492bdb5c0c77c53ae769f0d408b04d5c99b (patch) | |
tree | 0d90082db097094b105cc2de942b415c0418931b | |
parent | 8fa22964f69d3ec8700f177dd7cb3cbc396a9f35 (diff) |
test/lowlevel-blt-bench: Add common PDF operators
Applications are starting to use PDF operators, so far I have spotted
multiply, dodge and lighten.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | test/lowlevel-blt-bench.c | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/test/lowlevel-blt-bench.c b/test/lowlevel-blt-bench.c index 99b96c03..c54fbd52 100644 --- a/test/lowlevel-blt-bench.c +++ b/test/lowlevel-blt-bench.c @@ -63,22 +63,32 @@ static const struct format { }; static const struct op { + int value; const char *name; } ops[] = { - [PictOpClear] = { "Clear" }, - [PictOpSrc] = { "Src" }, - [PictOpDst] = { "Dst" }, - [PictOpOver] = { "Over" }, - [PictOpOverReverse] = { "OverReverse" }, - [PictOpIn] = { "In" }, - [PictOpInReverse] = { "InReverse" }, - [PictOpOut] = { "Out" }, - [PictOpOutReverse] = { "OutReverse" }, - [PictOpAtop] = { "Atop" }, - [PictOpAtopReverse] = { "AtopReverse" }, - [PictOpXor] = { "Xor" }, - [PictOpAdd] = { "Add" }, - [PictOpSaturate] = { "Saturate" }, + { PictOpClear, "Clear" }, + { PictOpSrc, "Src" }, + { PictOpDst, "Dst" }, + { PictOpOver, "Over" }, + { PictOpOverReverse, "OverReverse" }, + { PictOpIn, "In" }, + { PictOpInReverse, "InReverse" }, + { PictOpOut, "Out" }, + { PictOpOutReverse, "OutReverse" }, + { PictOpAtop, "Atop" }, + { PictOpAtopReverse, "AtopReverse" }, + { PictOpXor, "Xor" }, + { PictOpAdd, "Add" }, + { PictOpSaturate, "Saturate" }, + { PictOpMultiply, "Multiply" }, + { PictOpScreen, "Screen" }, + { PictOpOverlay, "Overlay" }, + { PictOpDarken, "Darken" }, + { PictOpLighten, "Lighten" }, + { PictOpColorDodge, "Dodge" }, + { PictOpColorBurn, "Burn" }, + { PictOpHardLight, "HardLight" }, + { PictOpSoftLight, "SoftLight" }, }; static Picture source_pixmap(struct test_display *t, struct test_target *target, int format) @@ -340,6 +350,8 @@ static void bench_source(struct test *t, enum target target, int op, int src) fprintf(stdout, "%28s with %s: ", source[src].name, ops[op].name); fflush(stdout); + op = ops[op].value; + ref = _bench_source(&t->ref, target, op, src, 1000); if (ref < 0) { fprintf(stdout, "SKIP\n"); @@ -403,6 +415,8 @@ static void bench_mask(struct test *t, enum target target, int op, int src, int source[src].name, source[mask].name, ops[op].name); fflush(stdout); + op = ops[op].value; + ref = _bench_mask(&t->ref, target, op, src, mask, 1000); if (ref < 0) { fprintf(stdout, "SKIP\n"); |