Move the FPS computation from the D3D code to the common code.