rendering optimizations, dirty still not correct