shadow: add shadow caching for paint