moved the code to make a cairo surface to ImageView.