Optimize rendering functions in MandelbrotEngine