Refactor to a static helper class
Now isHighDpi only gets calculated once and then is stored.