Merged fillRect and clearRect to single clearBeforeRender boolean.