}
Aggregator aggregator = source.defaultAggregator.aggregator();
Glyphset glyphs = source.glyphset;
Transfer transfer = OptionTransfer.toTransfer(source.defaultTransfers, null);
Renderer render;
if (rend.startsWith("PARALLEL")) {
render = new ParallelRenderer();
} else if (rend.startsWith("SERIAL")) {
render = new SerialRenderer();
} else {
throw new IllegalArgumentException("Renderer type not known: " + rend);
}
AffineTransform vt = Util.zoomFit(glyphs.bounds(), width, height);
Selector s = TouchesPixel.make(glyphs);
long taskCount = cores * tasksPerThread;
if (header) {
System.out.println("source, elapse/avg agg, elapse/avg trans, iter num, width, height, renderer, cores, tasks (max)");
}
try {
for (int i=0; i<iterations; i++) {
long start = System.currentTimeMillis();
Aggregates<Integer> aggs = render.aggregate(glyphs, s, aggregator, vt, width, height);
long end = System.currentTimeMillis();
long aggTime = end-start;
start = System.currentTimeMillis();
Transfer.Specialized<Number,Color> ts = transfer.specialize(aggs);
Aggregates<Color> colors = render.transfer(aggs, ts);
end = System.currentTimeMillis();
long transTime = end-start;
aggs.get(0, 0);