2
Vote

Develop & Test for multi-threaded rendering (shape/line drawing etc)

description

This is a nice to have, but I would like to see WBEx allow multi-threaded rendering of shapes and lines. I did a test project where I drew a segmented line in parallel and it worked perfectly so long as I call the DrawLine(int * ..) overload (ie: not call any properties on the WriteableBitmap itself). The performance was awesome. Drawing a segmented line is naturally parallel as it does not matter the order that segments are drawn.
 
To enable this WPF developers would need to lock/unlock the WB before rendering on a background thread and Draw(x) methods would require overloads that pass int[] or int *. A simple demo app showing this would be useful.
 
Another idea is multi-threaded blitting or polygon (fill) drawing. Each row is a memcpy operation so these operations could be parallelised internally, but would it be worth it in terms of speed vs. complexity?

comments