egl: Rewrite eglGetMscRateANGLE to avoid probes and handle multi-monitor
RRGetScreenInfo re-probes connector status, which may result in an EDID transfer for every output, which according to Adam Jackson can be on the order of 100ms for a single EDID block. So our previous implementation of this eglGetMscRateANGLE was blocking for excessive periods of time instead of being a quick query of the refresh rate like users expect. This changes our eglGetMscRateANGLE implementation from using RRGetScreenInfo to RRGetScreenResourcesCurrent and RRGetCrtcInfo. This obtains the same monitor info without re-probing connectors. Fixes a severe performance regression in Chromium WebGL performance. While we're re-implementing the extension, we also implement proper multi-monitor support: if there are multiple active CRTCs, we determine which contains the largest portion of the surface, as specified in the EGL_ANGLE_sync_control_rate extension. We also now report fractional refresh rates correctly rather than rounding to the nearest Hz. Fixes: 47526556 ("egl/x11: implement ANGLE_sync_control_rate") Closes: #6996 Closes: #7038 Reviewed-by:Adam Jackson <ajax@redhat.com> Part-of: <!20665> (cherry picked from commit 41d5f0ee)