If you need performance, OpenGL is the way to go.
See this post for some insights: Gradient dithering?