Refactor TextCanvas to supporting caching command list.