[clearRect][putImageData][getImageData] clear canvas partially to improve the performance