private static void createTemporaryBackgroundTransform(JComponent root, PainterHelper painterHelper, Disposable disposable) {
    Disposer.register(disposable, JBSwingUtilities.addGlobalCGTransform((c, g) -> {
      if (!UIUtil.isAncestor(root, c)) {
        return g;
      }

      Boolean noBackground = ClientProperty.get(c, NO_BACKGROUND);
      if (Boolean.TRUE.equals(noBackground)) {
        return MyGraphics.unwrap(g);
      }

      return MyGraphics.wrap(g, painterHelper, c);
    }));
  }
private static void createTemporaryBackgroundTransform(JComponent root, PainterHelper painterHelper, Disposable disposable)