It seems hacky to have an option to ResizeObserver that actually makes it a paint invalidation observer. Feels like there should be a particular observer for this, eg PaintInvalidationObserver. Paint invalidation would also happen on resize, so usage should be simple.