title: Alternatives to Canvas.snapshot() on JavaFX
body: <p>I'm developing a little graphic engine using <code>Canvas</code> in JavaFX. In some point I had to render an off screen image, and then print it on my primary canvas using its <code>GraphicContext</code>.<br>
  I'm using this code right now:</p>
  
  <pre><code>private Canvas offScreenCanvas;
  private GraphicsContext offScreenGraphic;
  private SnapshotParameters parameters;
  private WritableImage offScreenImage;
  
  [...]
  
  offScreenCanvas = new Canvas(WIDTH, HEIGHT);
  offScreenGraphic = offScreenCanvas.getGraphicsContext2D();
  
  parameters = new SnapshotParameters();
  parameters.setFill(Color.TRANSPARENT);
  
  [...]
  
  offScreenImage = offScreenCanvas.snapshot(parameters, offScreenImage);
  graphic.setGlobalBlendMode(BlendMode.HARD_LIGHT);
  graphic.drawImage(offScreenImage, 0, 0);
  graphic.setGlobalBlendMode(BlendMode.SRC_OVER);
  </code></pre>
  
  <p>My problem is the method <code>snaphot()</code> takes too much time, ~14ms, in each execution. I need to update the canvas at least at 60fps, so this consumes practically all the time I have to draw.</p>
  
  <p>Is there another way to get an <code>Image</code> or <code>WritableImage</code> from a canvas? Maybe another different process?</p>