I wouldn't call this a bug, you just happen to write super inefficient graphics code. Drawing a line with an angle with a gradient is likely to mess up the rasterizer of the software renderer while the OpenGL renderer has a different pipeline.
There's nothing I can do here except for suggesting to write faster code.