Minor optimizations based on visibility of frames.