ui.backend.cocoa.views: clear cache to remove possibly non-retina stuff.
ui.tools.common: reuse code.