[master 13/19] Hoist doResize to DeviceFormat and rename it resize().