Optimize triangle filling and anti-aliasing algorithms