Performance bugfix: GetSurfaceHeight() is actually very expensive, cache it.