Skip to content

Commit 7e2a3fb

Browse files
committed
Roll back accidental change
1 parent eb3d0d2 commit 7e2a3fb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • app/rtplot/src/main/java/org/csstudio/javafx/rtplot

app/rtplot/src/main/java/org/csstudio/javafx/rtplot/RTTank.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ public RTTank()
119119
widthProperty().addListener(resize_listener);
120120
heightProperty().addListener(resize_listener);
121121

122-
// 50Hz default throttle
122+
// 20Hz default throttle
123123
update_throttle = new UpdateThrottle(50, TimeUnit.MILLISECONDS, () ->
124124
{
125125
if (needUpdate.getAndSet(false)){
126-
plot_image = updateImageBuffer();
126+
plot_image = updateImageBuffer(); // This will return null if image buffer instantiation times out
127127
if(plot_image != null){
128128
redrawSafely();
129129
}
@@ -253,7 +253,7 @@ protected Image updateImageBuffer()
253253
if (buffer == null)
254254
return null;
255255
final BufferedImage image = buffer.getImage();
256-
final Graphics2D gc = image.createGraphics();
256+
final Graphics2D gc = buffer.getGraphics();
257257

258258
gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
259259
gc.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED);

0 commit comments

Comments
 (0)