protected void drawVolatileImage(VolatileImage vi) {
    JBHiDPIScaledImage image = myImage;

    // Draw buffered image into VolatileImage
    Graphics2D g = (Graphics2D)vi.getGraphics().create();
    try {
      g.setBackground(Gray.TRANSPARENT);
      g.setComposite(AlphaComposite.Src);
      g.clearRect(0, 0, vi.getWidth(), vi.getHeight());

      // Draw volatile image from BufferedImage
      if (image != null) {
        UIUtil.drawImage(g, image, 0, 0, null);
      }

      if (myPopupShown) {
        synchronized (myPopupMutex) {
          Image popupImage = myPopupImage;
          if (myPopupShown && popupImage != null) {
            UIUtil.drawImage(g, popupImage, myPopupBounds.x, myPopupBounds.y, null);
          }
        }
      }
    }
    finally {
      g.dispose();
    }
  }
protected void drawVolatileImage(VolatileImage vi)