Painting --- before optimization (dirty 0,0,68220,48720): Painting --- after optimization: Painting --- retained layer tree: