};
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)
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");
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");