fix CALayer/Display.setParent driver crash on resize