memory optimizations while drawing surface of gPianoRoll