This patch avoids creating weak references on every paint call by caching the Path object between paints.