Make Painter singleton

Signed-off-by: wenpin.cui <wenpincui224@gmail.com>