1. What is "signal processing code"?
2. You should move to OnDraw only the code used for drawing (or such a code could be called from the OnDraw...)