Switched selection mask to canvas to improve performances