public static boolean freezePaintingToReduceFlickering(@Nullable Component component) {
    if (component instanceof AntiFlickeringPanel antiFlickeringPanel) {
      int delay = Registry.intValue("debugger.anti.flickering.delay", 0);
      if (delay > 0) {
        ApplicationManager.getApplication().invokeAndWait(() -> antiFlickeringPanel.freezePainting(delay), ModalityState.any());
        return true;
      }
    }
    return false;
  }
public static boolean freezePaintingToReduceFlickering(@Nullable Component component)